diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2020-05-27 12:55:02 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2020-05-27 12:55:02 (GMT) |
commit | 2c3036881087f69ed60433ab05b3edaa854b0b90 (patch) | |
tree | 98b9dc21188b277f9fd5fa466fef9c3ba2a402d0 /library/ttk | |
parent | 970a72bb92857f54d7fedccfad37d2a5b03c5e4f (diff) | |
parent | 9d65143eb6ec4d77828501177d7275b0c84b5958 (diff) | |
download | tk-2c3036881087f69ed60433ab05b3edaa854b0b90.zip tk-2c3036881087f69ed60433ab05b3edaa854b0b90.tar.gz tk-2c3036881087f69ed60433ab05b3edaa854b0b90.tar.bz2 |
Rename utility functions. Make Delete and Backspace work too
Diffstat (limited to 'library/ttk')
-rw-r--r-- | library/ttk/entry.tcl | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/library/ttk/entry.tcl b/library/ttk/entry.tcl index 1d7b2fb..44a190d 100644 --- a/library/ttk/entry.tcl +++ b/library/ttk/entry.tcl @@ -278,7 +278,7 @@ proc ttk::entry::PrevWord {w start} { # proc ttk::entry::NextChar {w start} { variable State - set pos [tcl_endOfChar [$w get] [expr {[$w index $start]+1}]] + set pos [::tk::endOfGlyphCluster [$w get] [expr {[$w index $start]+1}]] if {$pos < 0} { return end } @@ -288,7 +288,7 @@ proc ttk::entry::NextChar {w start} { ## PrevChar -- Find the previous word position. # proc ttk::entry::PrevChar {w start} { - set pos [tcl_startOfChar [$w get] [expr {[$w index $start]-1}]] + set pos [::tk::startOfGlyphCluster [$w get] [expr {[$w index $start]-1}]] if {$pos < 0} { return 0 } @@ -631,7 +631,7 @@ proc ttk::entry::Backspace {w} { set x [expr {[$w index insert] - 1}] if {$x < 0} { return } - $w delete $x + $w delete [::tk::startOfGlyphCluster [$w get] $x] [expr {[::tk::endOfGlyphCluster [$w get] $x]+1}] if {[$w index @0] >= [$w index insert]} { set range [$w xview] @@ -646,7 +646,7 @@ proc ttk::entry::Backspace {w} { # proc ttk::entry::Delete {w} { if {![PendingDelete $w]} { - $w delete insert + $w delete [::tk::startOfGlyphCluster [$w get] [$w index insert]] [expr {[::tk::endOfGlyphCluster [$w get] [$w index insert]]+1}] } } |