summaryrefslogtreecommitdiffstats
path: root/library/text.tcl
diff options
context:
space:
mode:
authorfvogel <fvogelnew1@free.fr>2015-10-04 08:29:59 (GMT)
committerfvogel <fvogelnew1@free.fr>2015-10-04 08:29:59 (GMT)
commitc7d020f9aa512fca43d5187bde260ddd0ba5272d (patch)
treea01cefc4f2d1b0792281d81a5397c5fb20d9abd1 /library/text.tcl
parent44c45f28a8441ea95bfbdbae24dee94452bb2d3b (diff)
downloadtk-c7d020f9aa512fca43d5187bde260ddd0ba5272d.zip
tk-c7d020f9aa512fca43d5187bde260ddd0ba5272d.tar.gz
tk-c7d020f9aa512fca43d5187bde260ddd0ba5272d.tar.bz2
Fixed bug [1669632fff] case (vii) - <<Undo>> shall not remove separators
Diffstat (limited to 'library/text.tcl')
-rw-r--r--library/text.tcl9
1 files changed, 9 insertions, 0 deletions
diff --git a/library/text.tcl b/library/text.tcl
index 396ce1b..4a0e2c7 100644
--- a/library/text.tcl
+++ b/library/text.tcl
@@ -346,7 +346,16 @@ bind Text <Control-t> {
}
bind Text <<Undo>> {
+ # An Undo operation may remove the separator at the top of the Undo stack.
+ # Then the item at the top of the stack gets merged with the subsequent changes.
+ # Place separators before and after Undo to prevent this.
+ if {[%W cget -autoseparators]} {
+ %W edit separator
+ }
catch { %W edit undo }
+ if {[%W cget -autoseparators]} {
+ %W edit separator
+ }
}
bind Text <<Redo>> {