diff options
author | mdejong <mdejong@noemail.net> | 2001-03-29 11:05:49 (GMT) |
---|---|---|
committer | mdejong <mdejong@noemail.net> | 2001-03-29 11:05:49 (GMT) |
commit | 19fdc225278330606a771961549b849a75f2a826 (patch) | |
tree | 9d6abc2c93dfebf503b7eb3673381b74c064ed01 /library/text.tcl | |
parent | 966ac7ebc83043789809944fba64d6d0fa420655 (diff) | |
download | tk-19fdc225278330606a771961549b849a75f2a826.zip tk-19fdc225278330606a771961549b849a75f2a826.tar.gz tk-19fdc225278330606a771961549b849a75f2a826.tar.bz2 |
* library/entry.tcl (tkEntryMouseSelect):
* library/text.tcl (tkTextSelectTo): When
the mouse is dragged with the button down,
move the insertion cursor to the current
mouse position.
* tests/event.test: Add a series of tests
for event generation. Add tests for selection,
check the position of the insertion cursor.
FossilOrigin-Name: 0f4e18f028203f54ff93fb9339069dd2f7c8f1e0
Diffstat (limited to 'library/text.tcl')
-rw-r--r-- | library/text.tcl | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/library/text.tcl b/library/text.tcl index 742f82f..79a49e1 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.13 2000/07/19 23:22:20 ericm Exp $ +# RCS: @(#) $Id: text.tcl,v 1.14 2001/03/29 11:05:49 mdejong Exp $ # # Copyright (c) 1992-1994 The Regents of the University of California. # Copyright (c) 1994-1997 Sun Microsystems, Inc. @@ -581,15 +581,9 @@ proc tkTextSelectTo {w x y {extend 0}} { } } if {$tkPriv(mouseMoved) || [string compare $tkPriv(selectMode) "char"]} { - if {[string compare $tcl_platform(platform) "unix"] \ - && [$w compare $cur < anchor]} { - $w mark set insert $first - } else { - $w mark set insert $last - } - $w tag remove sel 0.0 $first + $w tag remove sel 0.0 end + $w mark set insert $cur $w tag add sel $first $last - $w tag remove sel $last end update idletasks } } |