summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--library/text.tcl3
-rw-r--r--tests/text.test21
2 files changed, 23 insertions, 1 deletions
diff --git a/library/text.tcl b/library/text.tcl
index 1321334..396ce1b 100644
--- a/library/text.tcl
+++ b/library/text.tcl
@@ -244,6 +244,9 @@ bind Text <Control-slash> {
}
bind Text <Control-backslash> {
%W tag remove sel 1.0 end
+ if {[%W cget -autoseparators]} {
+ %W edit separator
+ }
}
bind Text <<Cut>> {
tk_textCut %W
diff --git a/tests/text.test b/tests/text.test
index 0ea4a6e..661584d 100644
--- a/tests/text.test
+++ b/tests/text.test
@@ -3205,7 +3205,7 @@ test text-25.18 {patch 1469210 - inserting after undo} -setup {
} -cleanup {
destroy .t
} -result 1
-test text-25.19 {patch 1669632 (i) - undo after Control-1} -setup {
+test text-25.19 {patch 1669632 (i) - undo after <Control-1>} -setup {
destroy .t
} -body {
text .t -undo 1
@@ -3219,6 +3219,25 @@ test text-25.19 {patch 1669632 (i) - undo after Control-1} -setup {
} -cleanup {
destroy .t
} -result WORLD
+test text-25.20 {patch 1669632 (iv) - undo after <Control-backslash>} -setup {
+ destroy .t
+} -body {
+ toplevel .top
+ pack [text .top.t -undo 1]
+ .top.t insert end "This is an example text"
+ .top.t edit reset
+ .top.t mark set insert 1.5
+ .top.t insert 1.5 HELLO
+ .top.t tag add sel 1.10 1.12
+ update
+ focus -force .top.t
+ event generate .top.t <Control-backslash>
+ .top.t insert insert " WORLD "
+ .top.t edit undo
+ .top.t get 1.5 1.10
+} -cleanup {
+ destroy .top.t .top
+} -result HELLO
test text-26.1 {bug fix - 624372, ControlUtfProc long lines} {
destroy .t