diff options
author | fvogel <fvogelnew1@free.fr> | 2015-10-03 20:00:57 (GMT) |
---|---|---|
committer | fvogel <fvogelnew1@free.fr> | 2015-10-03 20:00:57 (GMT) |
commit | d842640197e344a68b6bb601ec39f74c1d071be0 (patch) | |
tree | 6c070e363070b764416146e1de45299d9a5392d3 | |
parent | 232769312e8b6d7b1fa4bb3674b8afe660b8b59f (diff) | |
download | tk-d842640197e344a68b6bb601ec39f74c1d071be0.zip tk-d842640197e344a68b6bb601ec39f74c1d071be0.tar.gz tk-d842640197e344a68b6bb601ec39f74c1d071be0.tar.bz2 |
Fixed bug [1669632fff] case (iv) - autoseparator was missing on <Control-backslash>
-rw-r--r-- | library/text.tcl | 3 | ||||
-rw-r--r-- | tests/text.test | 21 |
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 |