diff options
author | culler <culler> | 2020-11-10 22:18:25 (GMT) |
---|---|---|
committer | culler <culler> | 2020-11-10 22:18:25 (GMT) |
commit | 0f9a010d1cf8a2bf2f14a573cf48eefdb46a0abd (patch) | |
tree | 64cbeaecb3c761c1b167dcc7050e07a52f1d6819 /library/entry.tcl | |
parent | 387766b8dc96912fac2f0cf7f1a29f32c4951faf (diff) | |
download | tk-0f9a010d1cf8a2bf2f14a573cf48eefdb46a0abd.zip tk-0f9a010d1cf8a2bf2f14a573cf48eefdb46a0abd.tar.gz tk-0f9a010d1cf8a2bf2f14a573cf48eefdb46a0abd.tar.bz2 |
Better names, better implementation: GlyphCluster -> Cluster; use namespaces
Diffstat (limited to 'library/entry.tcl')
-rw-r--r-- | library/entry.tcl | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/library/entry.tcl b/library/entry.tcl index 3652ebe..8d0fb3e 100644 --- a/library/entry.tcl +++ b/library/entry.tcl @@ -165,7 +165,7 @@ bind Entry <Delete> { if {[%W selection present]} { %W delete sel.first sel.last } else { - %W delete [::tk::startOfGlyphCluster [%W get] [%W index insert]] [::tk::endOfGlyphCluster [%W get] [%W index insert]] + %W delete [::tk::startOfCluster [%W get] [%W index insert]] [::tk::endOfCluster [%W get] [%W index insert]] } } bind Entry <BackSpace> { @@ -505,8 +505,8 @@ proc ::tk::EntryBackspace w { } else { set x [expr {[$w index insert] - 1}] if {$x >= 0} { - $w delete [::tk::startOfGlyphCluster [$w get] $x] \ - [::tk::endOfGlyphCluster [$w get] $x] + $w delete [::tk::startOfCluster [$w get] $x] \ + [::tk::endOfCluster [$w get] $x] } if {[$w index @0] >= [$w index insert]} { set range [$w xview] @@ -621,7 +621,7 @@ proc ::tk::EntryPreviousWord {w start} { } proc ::tk::EntryNextChar {w start} { - set pos [::tk::endOfGlyphCluster [$w get] [$w index $start]] + set pos [::tk::endOfCluster [$w get] [$w index $start]] if {$pos < 0} { return end } @@ -629,7 +629,7 @@ proc ::tk::EntryNextChar {w start} { } proc ::tk::EntryPreviousChar {w start} { - set pos [::tk::startOfGlyphCluster [$w get] [expr {[$w index $start]-1}]] + set pos [::tk::startOfCluster [$w get] [expr {[$w index $start]-1}]] if {$pos < 0} { return 0 } @@ -637,7 +637,7 @@ proc ::tk::EntryPreviousChar {w start} { } proc ::tk::EntryInsertChar {w start} { - set pos [::tk::endOfGlyphCluster [$w get] [$w index $start]] + set pos [::tk::endOfCluster [$w get] [$w index $start]] if {$pos < 0} { return end } |