summaryrefslogtreecommitdiffstats
path: root/library
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2020-05-27 13:12:10 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2020-05-27 13:12:10 (GMT)
commit53c3528bef55541b6033d2c2e77ba804a0a80141 (patch)
treec0fa5e88ced6dc1dfcddecdb78e44c53e12e2d40 /library
parent2c3036881087f69ed60433ab05b3edaa854b0b90 (diff)
downloadtk-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.tcl4
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
}