summaryrefslogtreecommitdiffstats
path: root/library
diff options
context:
space:
mode:
authorhobbs <hobbs>2004-08-26 18:03:28 (GMT)
committerhobbs <hobbs>2004-08-26 18:03:28 (GMT)
commit9a9a79ebcba49db6340ba7fb9dd24a00acf50cf4 (patch)
tree51988e4316f7399d8b4137290883de3ba8da8760 /library
parent9f76ea91053b1e1e642f8a9562aa76ea7550f40b (diff)
downloadtk-9a9a79ebcba49db6340ba7fb9dd24a00acf50cf4.zip
tk-9a9a79ebcba49db6340ba7fb9dd24a00acf50cf4.tar.gz
tk-9a9a79ebcba49db6340ba7fb9dd24a00acf50cf4.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.tcl12
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 --