summaryrefslogtreecommitdiffstats
path: root/library/entry.tcl
diff options
context:
space:
mode:
authorfvogel <fvogelnew1@free.fr>2016-01-11 13:23:20 (GMT)
committerfvogel <fvogelnew1@free.fr>2016-01-11 13:23:20 (GMT)
commitddae56bbd0023f29a24d0529ed4fa0e3820ce7f2 (patch)
tree87dfd77a94fb45488edde792e3b0735459a1fea7 /library/entry.tcl
parent5c01788dc22a4a2f8e6d9e943dc61a5b73b28291 (diff)
parent4a2efd946fe6674e460172920d097f7329d8e5d9 (diff)
downloadtk-ddae56bbd0023f29a24d0529ed4fa0e3820ce7f2.zip
tk-ddae56bbd0023f29a24d0529ed4fa0e3820ce7f2.tar.gz
tk-ddae56bbd0023f29a24d0529ed4fa0e3820ce7f2.tar.bz2
merged trunk
Diffstat (limited to 'library/entry.tcl')
-rw-r--r--library/entry.tcl15
1 files changed, 10 insertions, 5 deletions
diff --git a/library/entry.tcl b/library/entry.tcl
index f28547e..6243d26 100644
--- a/library/entry.tcl
+++ b/library/entry.tcl
@@ -46,7 +46,6 @@ bind Entry <<Copy>> {
}
}
bind Entry <<Paste>> {
- global tcl_platform
catch {
if {[tk windowingsystem] ne "x11"} {
catch {
@@ -69,8 +68,8 @@ bind Entry <<PasteSelection>> {
}
bind Entry <<TraverseIn>> {
- %W selection range 0 end
- %W icursor end
+ %W selection range 0 end
+ %W icursor end
}
# Standard Motif bindings:
@@ -358,12 +357,18 @@ proc ::tk::EntryMouseSelect {w x} {
}
}
word {
- if {$cur < [$w index anchor]} {
+ if {$cur < $anchor} {
set before [tcl_wordBreakBefore [$w get] $cur]
set after [tcl_wordBreakAfter [$w get] [expr {$anchor-1}]]
- } else {
+ } elseif {$cur > $anchor} {
set before [tcl_wordBreakBefore [$w get] $anchor]
set after [tcl_wordBreakAfter [$w get] [expr {$cur - 1}]]
+ } else {
+ if {[$w index @$Priv(pressX)] < $anchor} {
+ incr anchor -1
+ }
+ set before [tcl_wordBreakBefore [$w get] $anchor]
+ set after [tcl_wordBreakAfter [$w get] $anchor]
}
if {$before < 0} {
set before 0