summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog7
-rw-r--r--doc/text.n12
-rw-r--r--library/text.tcl18
3 files changed, 22 insertions, 15 deletions
diff --git a/ChangeLog b/ChangeLog
index fcf93f8..5be9374 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2003-04-18 Vince Darley <vincentdarley@users.sourceforge.net>
+
+ * library/text.tcl
+ * doc/text.n: corrected 'Home' and 'End' and Control-a/e handling
+ to work with display lines. This was an ommission of the previous
+ tip155 patch. Clarified the documentation on this point.
+
2005-04-14 Jeff Hobbs <jeffh@ActiveState.com>
* unix/tkUnixFont.c (FontMapLoadPage): reorder char[] decls to
diff --git a/doc/text.n b/doc/text.n
index c294f27..4b2c933 100644
--- a/doc/text.n
+++ b/doc/text.n
@@ -5,7 +5,7 @@
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
-'\" RCS: @(#) $Id: text.n,v 1.35 2005/02/14 23:02:52 vincentdarley Exp $
+'\" RCS: @(#) $Id: text.n,v 1.36 2005/04/18 11:34:41 vincentdarley Exp $
'\"
.so man.macros
.TH text n 8.5 Tk "Tk Built-In Commands"
@@ -2026,14 +2026,14 @@ Control-Next and Control-Prior scroll the view right or left by one page
without moving the insertion cursor or affecting the selection.
.IP [13]
Home and Control-a move the insertion cursor to the
-beginning of its line and clear any selection in the widget.
-Shift-Home moves the insertion cursor to the beginning of the line
+beginning of its display line and clear any selection in the widget.
+Shift-Home moves the insertion cursor to the beginning of the display line
and also extends the selection to that point.
.IP [14]
End and Control-e move the insertion cursor to the
-end of the line and clear any selection in the widget.
-Shift-End moves the cursor to the end of the line and extends the selection
-to that point.
+end of the display line and clear any selection in the widget.
+Shift-End moves the cursor to the end of the display line and extends
+the selection to that point.
.IP [15]
Control-Home and Meta-< move the insertion cursor to the beginning of
the text and clear any selection in the widget.
diff --git a/library/text.tcl b/library/text.tcl
index f630149..40973e7 100644
--- a/library/text.tcl
+++ b/library/text.tcl
@@ -3,7 +3,7 @@
# This file defines the default bindings for Tk text widgets and provides
# procedures that help in implementing the bindings.
#
-# RCS: @(#) $Id: text.tcl,v 1.35 2004/10/18 13:40:56 vincentdarley Exp $
+# RCS: @(#) $Id: text.tcl,v 1.36 2005/04/18 11:34:41 vincentdarley Exp $
#
# Copyright (c) 1992-1994 The Regents of the University of California.
# Copyright (c) 1994-1997 Sun Microsystems, Inc.
@@ -155,16 +155,16 @@ bind Text <Control-Next> {
}
bind Text <Home> {
- tk::TextSetCursor %W {insert linestart}
+ tk::TextSetCursor %W {insert display linestart}
}
bind Text <Shift-Home> {
- tk::TextKeySelect %W {insert linestart}
+ tk::TextKeySelect %W {insert display linestart}
}
bind Text <End> {
- tk::TextSetCursor %W {insert lineend}
+ tk::TextSetCursor %W {insert display lineend}
}
bind Text <Shift-End> {
- tk::TextKeySelect %W {insert lineend}
+ tk::TextKeySelect %W {insert display lineend}
}
bind Text <Control-Home> {
tk::TextSetCursor %W 1.0
@@ -173,10 +173,10 @@ bind Text <Control-Shift-Home> {
tk::TextKeySelect %W 1.0
}
bind Text <Control-End> {
- tk::TextSetCursor %W {end - 1 char}
+ tk::TextSetCursor %W {end - 1 indices}
}
bind Text <Control-Shift-End> {
- tk::TextKeySelect %W {end - 1 char}
+ tk::TextKeySelect %W {end - 1 indices}
}
bind Text <Tab> {
@@ -284,7 +284,7 @@ if {[string equal [tk windowingsystem] "aqua"]} {
bind Text <Control-a> {
if {!$tk_strictMotif} {
- tk::TextSetCursor %W {insert linestart}
+ tk::TextSetCursor %W {insert display linestart}
}
}
bind Text <Control-b> {
@@ -299,7 +299,7 @@ bind Text <Control-d> {
}
bind Text <Control-e> {
if {!$tk_strictMotif} {
- tk::TextSetCursor %W {insert lineend}
+ tk::TextSetCursor %W {insert display lineend}
}
}
bind Text <Control-f> {