diff options
author | hobbs <hobbs> | 2004-08-26 18:03:28 (GMT) |
---|---|---|
committer | hobbs <hobbs> | 2004-08-26 18:03:28 (GMT) |
commit | 97c495ce68eece2aab9e90f92a075dcd4b310b82 (patch) | |
tree | 51988e4316f7399d8b4137290883de3ba8da8760 /library | |
parent | 2e88b4bfe31e5b5f12f40f18521b4e4581785e1b (diff) | |
download | tk-97c495ce68eece2aab9e90f92a075dcd4b310b82.zip tk-97c495ce68eece2aab9e90f92a075dcd4b310b82.tar.gz tk-97c495ce68eece2aab9e90f92a075dcd4b310b82.tar.bz2 |
* library/text.tcl (::tk::TextTranspose): Ensure that Transpose is
an atomic op to undo.
Diffstat (limited to 'library')
-rw-r--r-- | library/text.tcl | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/library/text.tcl b/library/text.tcl index 7b181b1..fde0a16 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.31 2004/06/04 10:51:18 vincentdarley Exp $ +# RCS: @(#) $Id: text.tcl,v 1.32 2004/08/26 18:03:30 hobbs Exp $ # # Copyright (c) 1992-1994 The Regents of the University of California. # Copyright (c) 1994-1997 Sun Microsystems, Inc. @@ -972,9 +972,19 @@ proc ::tk::TextTranspose w { if {[$w compare "$pos - 1 char" == 1.0]} { return } + # ensure this is seen as an atomic op to undo + set autosep [$w cget -autoseparators] + if {$autosep} { + $w configure -autoseparators 0 + $w edit separator + } $w delete "$pos - 2 char" $pos $w insert insert $new $w see insert + if {$autosep} { + $w edit separator + $w configure -autoseparators $autosep + } } # ::tk_textCopy -- |