diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2020-05-27 13:12:10 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2020-05-27 13:12:10 (GMT) |
commit | 53c3528bef55541b6033d2c2e77ba804a0a80141 (patch) | |
tree | c0fa5e88ced6dc1dfcddecdb78e44c53e12e2d40 /library | |
parent | 2c3036881087f69ed60433ab05b3edaa854b0b90 (diff) | |
download | tk-53c3528bef55541b6033d2c2e77ba804a0a80141.zip tk-53c3528bef55541b6033d2c2e77ba804a0a80141.tar.gz tk-53c3528bef55541b6033d2c2e77ba804a0a80141.tar.bz2 |
Fix "Delete" and "Backspace" for text widgets
Diffstat (limited to 'library')
-rw-r--r-- | library/text.tcl | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/library/text.tcl b/library/text.tcl index 1b6fe70..9fb9a79 100644 --- a/library/text.tcl +++ b/library/text.tcl @@ -222,7 +222,7 @@ bind Text <Delete> { %W delete sel.first sel.last } else { if {[%W compare end != insert+1c]} { - %W delete [tk::TextPrevPos %W insert+1c ::tk::startOfGlyphCluster] [expr {[tk::TextNextPos %W insert ::tk::endOfGlyphCluster]+1}] + %W delete [tk::TextPrevPos %W insert+1c ::tk::startOfGlyphCluster] "[tk::TextNextPos %W insert ::tk::endOfGlyphCluster]+1c" } %W see insert } @@ -232,7 +232,7 @@ bind Text <BackSpace> { %W delete sel.first sel.last } else { if {[%W compare insert != 1.0]} { - %W delete [tk::TextPrevPos %W insert ::tk::startOfGlyphCluster] [expr {[tk::TextNextPos %W insert-1c ::tk::endOfGlyphCluster]+1}] + %W delete [tk::TextPrevPos %W insert ::tk::startOfGlyphCluster] "[tk::TextNextPos %W insert-1c ::tk::endOfGlyphCluster]+1c" } %W see insert } |