diff options
author | mdejong <mdejong@noemail.net> | 2002-02-15 05:48:07 (GMT) |
---|---|---|
committer | mdejong <mdejong@noemail.net> | 2002-02-15 05:48:07 (GMT) |
commit | e96d5b9c7643e95eeb26a714a5d1bea82f3df0c4 (patch) | |
tree | a92a6a4a308fef315c3db930b095d0173db35d2e /library | |
parent | 323359551984ac5d81c4a0964b891b25091959a9 (diff) | |
download | tk-e96d5b9c7643e95eeb26a714a5d1bea82f3df0c4.zip tk-e96d5b9c7643e95eeb26a714a5d1bea82f3df0c4.tar.gz tk-e96d5b9c7643e95eeb26a714a5d1bea82f3df0c4.tar.bz2 |
* library/entry.tcl:
* library/text.tcl: Adjust <Double-1> and <Triple-1> bindings
so that no anchor point is set and the insertion cursor is
set to the last character in the selection. [Bug 220943]
* tests/event.test: Add test cases for double click and
drag as well as triple click and drag in the text and
entry widgets.
FossilOrigin-Name: a938c4252de56c2a923c43dfdeb05e203a835a36
Diffstat (limited to 'library')
-rw-r--r-- | library/entry.tcl | 6 | ||||
-rw-r--r-- | library/text.tcl | 4 |
2 files changed, 4 insertions, 6 deletions
diff --git a/library/entry.tcl b/library/entry.tcl index 943e719..b869788 100644 --- a/library/entry.tcl +++ b/library/entry.tcl @@ -3,7 +3,7 @@ # This file defines the default bindings for Tk entry widgets and provides # procedures that help in implementing those bindings. # -# RCS: @(#) $Id: entry.tcl,v 1.17 2001/12/27 22:26:41 hobbs Exp $ +# RCS: @(#) $Id: entry.tcl,v 1.18 2002/02/15 05:48:08 mdejong Exp $ # # Copyright (c) 1992-1994 The Regents of the University of California. # Copyright (c) 1994-1997 Sun Microsystems, Inc. @@ -82,12 +82,12 @@ bind Entry <B1-Motion> { bind Entry <Double-1> { set tk::Priv(selectMode) word tk::EntryMouseSelect %W %x - catch {%W icursor sel.first} + catch {%W icursor sel.last} } bind Entry <Triple-1> { set tk::Priv(selectMode) line tk::EntryMouseSelect %W %x - %W icursor 0 + %W icursor sel.last } bind Entry <Shift-1> { set tk::Priv(selectMode) char diff --git a/library/text.tcl b/library/text.tcl index 928b61c..2dd8d87 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.20 2001/12/28 23:03:23 hobbs Exp $ +# RCS: @(#) $Id: text.tcl,v 1.21 2002/02/15 05:48:08 mdejong Exp $ # # Copyright (c) 1992-1994 The Regents of the University of California. # Copyright (c) 1994-1997 Sun Microsystems, Inc. @@ -54,13 +54,11 @@ bind Text <Double-1> { set tk::Priv(selectMode) word tk::TextSelectTo %W %x %y catch {%W mark set insert sel.last} - catch {%W mark set anchor sel.first} } bind Text <Triple-1> { set tk::Priv(selectMode) line tk::TextSelectTo %W %x %y catch {%W mark set insert sel.last} - catch {%W mark set anchor sel.first} } bind Text <Shift-1> { tk::TextResetAnchor %W @%x,%y |