summaryrefslogtreecommitdiffstats
path: root/library
diff options
context:
space:
mode:
authorfvogel <fvogel@noemail.net>2015-10-04 13:55:14 (GMT)
committerfvogel <fvogel@noemail.net>2015-10-04 13:55:14 (GMT)
commitd1d5700fa5b0adf3ab22054dd020210ec7fad531 (patch)
tree2c7eb6754c364df033025c9294a945c01fd96196 /library
parentd4038d927f5109312f679cbdbff2145d52ebd725 (diff)
downloadtk-d1d5700fa5b0adf3ab22054dd020210ec7fad531.zip
tk-d1d5700fa5b0adf3ab22054dd020210ec7fad531.tar.gz
tk-d1d5700fa5b0adf3ab22054dd020210ec7fad531.tar.bz2
Fixed bug [1669632fff] case (vi) - <<Cut>> is atomic
FossilOrigin-Name: 6750868854c4c75d45cc07984103accd463df431
Diffstat (limited to 'library')
-rw-r--r--library/text.tcl9
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
+ }
}
}