diff options
author | fvogel <fvogel@noemail.net> | 2015-10-04 09:04:42 (GMT) |
---|---|---|
committer | fvogel <fvogel@noemail.net> | 2015-10-04 09:04:42 (GMT) |
commit | cd7d214994e40dc2f9b41fad2bb2bfe5f391eb0f (patch) | |
tree | 3f6de39fa985cc913d002206c7040312f1147baa /library | |
parent | 8a641263ce78cf02316a0c234ff4dbc5eec05f83 (diff) | |
download | tk-cd7d214994e40dc2f9b41fad2bb2bfe5f391eb0f.zip tk-cd7d214994e40dc2f9b41fad2bb2bfe5f391eb0f.tar.gz tk-cd7d214994e40dc2f9b41fad2bb2bfe5f391eb0f.tar.bz2 |
Fixed bug [1669632fff] case (v) - <<Clear>> is atomic
FossilOrigin-Name: d45961b1373b5af1b028d7bb66dd2460dc29483a
Diffstat (limited to 'library')
-rw-r--r-- | library/text.tcl | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/library/text.tcl b/library/text.tcl index f973984..d7c0935 100644 --- a/library/text.tcl +++ b/library/text.tcl @@ -262,7 +262,15 @@ bind Text <<Paste>> { tk_textPaste %W } bind Text <<Clear>> { + # Make <<Clear>> an atomic operation on the Undo stack, + # i.e. separate it from other delete operations on either side + if {[%W cget -autoseparators]} { + %W edit separator + } catch {%W delete sel.first sel.last} + if {[%W cget -autoseparators]} { + %W edit separator + } } bind Text <<PasteSelection>> { if {$tk_strictMotif || ![info exists tk::Priv(mouseMoved)] |