diff options
author | fvogel <fvogelnew1@free.fr> | 2015-10-04 13:55:14 (GMT) |
---|---|---|
committer | fvogel <fvogelnew1@free.fr> | 2015-10-04 13:55:14 (GMT) |
commit | 69babf2af132856cc0221306450c09b368f89e9c (patch) | |
tree | 2c7eb6754c364df033025c9294a945c01fd96196 /library | |
parent | d18323e55843fd090168c487519968d92c6ebe37 (diff) | |
download | tk-69babf2af132856cc0221306450c09b368f89e9c.zip tk-69babf2af132856cc0221306450c09b368f89e9c.tar.gz tk-69babf2af132856cc0221306450c09b368f89e9c.tar.bz2 |
Fixed bug [1669632fff] case (vi) - <<Cut>> is atomic
Diffstat (limited to 'library')
-rw-r--r-- | library/text.tcl | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/library/text.tcl b/library/text.tcl index d7c0935..792ee3b 100644 --- a/library/text.tcl +++ b/library/text.tcl @@ -1081,9 +1081,18 @@ proc ::tk_textCopy w { proc ::tk_textCut w { if {![catch {set data [$w get sel.first sel.last]}]} { + # make <<Cut>> an atomic operation on the Undo stack, + # i.e. separate it from other delete operations on either side + set oldSeparator [$w cget -autoseparators] + if {$oldSeparator} { + $w edit separator + } clipboard clear -displayof $w clipboard append -displayof $w $data $w delete sel.first sel.last + if {$oldSeparator} { + $w edit separator + } } } |