summaryrefslogtreecommitdiffstats
path: root/library
diff options
context:
space:
mode:
authorfvogel <fvogel@noemail.net>2015-11-03 10:45:05 (GMT)
committerfvogel <fvogel@noemail.net>2015-11-03 10:45:05 (GMT)
commitb1557c55618517516ba5b7ecb8748f50afbca35b (patch)
tree4f1eada5ffa4f95c4c20cd70f45299a9e410a18c /library
parent8ba558c0e89c308ba89c7b6edf958301b6f62224 (diff)
downloadtk-b1557c55618517516ba5b7ecb8748f50afbca35b.zip
tk-b1557c55618517516ba5b7ecb8748f50afbca35b.tar.gz
tk-b1557c55618517516ba5b7ecb8748f50afbca35b.tar.bz2
Fixed entry part of bug [542199fff] - Double click on a lone character in an entry does not work
FossilOrigin-Name: d1e85ca45c2434911fa1d9f677a5ec22ecc44bc0
Diffstat (limited to 'library')
-rw-r--r--library/entry.tcl10
1 files changed, 8 insertions, 2 deletions
diff --git a/library/entry.tcl b/library/entry.tcl
index 382cc88..c3e573d 100644
--- a/library/entry.tcl
+++ b/library/entry.tcl
@@ -373,12 +373,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