summaryrefslogtreecommitdiffstats
path: root/library
diff options
context:
space:
mode:
authorfvogel <fvogel@noemail.net>2015-11-08 21:50:06 (GMT)
committerfvogel <fvogel@noemail.net>2015-11-08 21:50:06 (GMT)
commita04e4798aa60275ce5228d3b2d61157911569e07 (patch)
treeeb001f13d086e69bab191048fdc73f97cc539967 /library
parentbaca8e59e8bf1a13418ca466024e477f03259a44 (diff)
parent05dfb89eeaef347b9d8d188513a96160743bc1b9 (diff)
downloadtk-a04e4798aa60275ce5228d3b2d61157911569e07.zip
tk-a04e4798aa60275ce5228d3b2d61157911569e07.tar.gz
tk-a04e4798aa60275ce5228d3b2d61157911569e07.tar.bz2
Fixed entry (and final) part of bug [542199fff] - Double click on a lone character in an entry does not work
FossilOrigin-Name: 2cf8afea8c90d75e0bacc3493c7cd4a526deb2a7
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 f7170f7..6243d26 100644
--- a/library/entry.tcl
+++ b/library/entry.tcl
@@ -357,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