summaryrefslogtreecommitdiffstats
path: root/library/entry.tcl
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2022-04-11 20:32:37 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2022-04-11 20:32:37 (GMT)
commit11769f5c46a422bee9ac737b4a70d390e6bab012 (patch)
treed03cfd0e97871fbb237de8b5518f7f18522b3aba /library/entry.tcl
parent6b77225dcafc4523a84678f1d420e64b3759a405 (diff)
downloadtk-11769f5c46a422bee9ac737b4a70d390e6bab012.zip
tk-11769f5c46a422bee9ac737b4a70d390e6bab012.tar.gz
tk-11769f5c46a422bee9ac737b4a70d390e6bab012.tar.bz2
Make use of TIP #577 in entry/ttk::entry
Diffstat (limited to 'library/entry.tcl')
-rw-r--r--library/entry.tcl12
1 files changed, 6 insertions, 6 deletions
diff --git a/library/entry.tcl b/library/entry.tcl
index 1af9e65..ae58d02 100644
--- a/library/entry.tcl
+++ b/library/entry.tcl
@@ -119,17 +119,17 @@ bind Entry <Control-Button-1> {
}
bind Entry <<PrevChar>> {
- tk::EntrySetCursor %W [expr {[%W index insert]-1}]
+ tk::EntrySetCursor %W [%W index insert]-1
}
bind Entry <<NextChar>> {
- tk::EntrySetCursor %W [expr {[%W index insert]+1}]
+ tk::EntrySetCursor %W [%W index insert]+1
}
bind Entry <<SelectPrevChar>> {
- tk::EntryKeySelect %W [expr {[%W index insert]-1}]
+ tk::EntryKeySelect %W [%W index insert]-1
tk::EntrySeeInsert %W
}
bind Entry <<SelectNextChar>> {
- tk::EntryKeySelect %W [expr {[%W index insert]+1}]
+ tk::EntryKeySelect %W [%W index insert]+1
tk::EntrySeeInsert %W
}
bind Entry <<PrevWord>> {
@@ -518,7 +518,7 @@ proc ::tk::EntryBackspace w {
} else {
set x [$w index insert]
if {$x > 0} {
- $w delete [expr {$x-1}]
+ $w delete $x-1
}
if {[$w index @0] >= [$w index insert]} {
set range [$w xview]
@@ -576,7 +576,7 @@ proc ::tk::EntryTranspose w {
if {$i < 2} {
return
}
- set first [expr {$i-2}]
+ set first $i-2
set data [$w get]
set new [string index $data $i-1][string index $data $first]
$w delete $first $i