summaryrefslogtreecommitdiffstats
path: root/library
diff options
context:
space:
mode:
Diffstat (limited to 'library')
-rw-r--r--library/text.tcl17
1 files changed, 11 insertions, 6 deletions
diff --git a/library/text.tcl b/library/text.tcl
index 9eb2cd0..742f82f 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.12 2000/04/17 23:24:29 ericm Exp $
+# RCS: @(#) $Id: text.tcl,v 1.13 2000/07/19 23:22:20 ericm Exp $
#
# Copyright (c) 1992-1994 The Regents of the University of California.
# Copyright (c) 1994-1997 Sun Microsystems, Inc.
@@ -36,7 +36,7 @@
#-------------------------------------------------------------------------
#-------------------------------------------------------------------------
-# The code below creates the default class bindings for entries.
+# The code below creates the default class bindings for text widgets.
#-------------------------------------------------------------------------
# Standard Motif bindings:
@@ -182,9 +182,11 @@ bind Text <Control-Shift-End> {
}
bind Text <Tab> {
- tkTextInsert %W \t
- focus %W
- break
+ if { [string equal [%W cget -state] "normal"] } {
+ tkTextInsert %W \t
+ focus %W
+ break
+ }
}
bind Text <Shift-Tab> {
# Needed only to keep <Tab> binding from triggering; doesn't
@@ -740,7 +742,10 @@ proc tkTextResetAnchor {w index} {
global tkPriv
if {[string equal [$w tag ranges sel] ""]} {
- $w mark set anchor $index
+ # Don't move the anchor if there is no selection now; this makes
+ # the widget behave "correctly" when the user clicks once, then
+ # shift-clicks somewhere -- ie, the area between the two clicks will be
+ # selected. [Bug: 5929].
return
}
set a [$w index $index]