From d842640197e344a68b6bb601ec39f74c1d071be0 Mon Sep 17 00:00:00 2001 From: fvogel Date: Sat, 3 Oct 2015 20:00:57 +0000 Subject: Fixed bug [1669632fff] case (iv) - autoseparator was missing on --- library/text.tcl | 3 +++ tests/text.test | 21 ++++++++++++++++++++- 2 files changed, 23 insertions(+), 1 deletion(-) 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 { } bind Text { %W tag remove sel 1.0 end + if {[%W cget -autoseparators]} { + %W edit separator + } } bind Text <> { 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 } -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 } -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 + .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 -- cgit v0.12