summaryrefslogtreecommitdiffstats
path: root/library
diff options
context:
space:
mode:
authorfvogel <fvogelnew1@free.fr>2023-04-21 19:08:38 (GMT)
committerfvogel <fvogelnew1@free.fr>2023-04-21 19:08:38 (GMT)
commit25a9c6e4355f8d478a3f8ffbe379a055cf6c9632 (patch)
treeb5f941867475956363ece0cb5445ee5b8248e7e8 /library
parent5f6a18aadac87bb6d56f2137e485c76693320ef2 (diff)
downloadtk-25a9c6e4355f8d478a3f8ffbe379a055cf6c9632.zip
tk-25a9c6e4355f8d478a3f8ffbe379a055cf6c9632.tar.gz
tk-25a9c6e4355f8d478a3f8ffbe379a055cf6c9632.tar.bz2
Fix [a9cf210a42]: Text select doesn't cover first character
Diffstat (limited to 'library')
-rw-r--r--library/text.tcl3
1 files changed, 2 insertions, 1 deletions
diff --git a/library/text.tcl b/library/text.tcl
index 6cfe9d0..a041a85 100644
--- a/library/text.tcl
+++ b/library/text.tcl
@@ -539,7 +539,8 @@ proc ::tk::TextClosestGap {w x y} {
if {$bbox eq ""} {
return $pos
}
- if {($x - [lindex $bbox 0]) < ([lindex $bbox 2]/2)} {
+ if {($y < [lindex [$w dlineinfo $pos] 1]) ||
+ ($x - [lindex $bbox 0]) < ([lindex $bbox 2]/2)} {
return $pos
}
$w index "$pos + 1 char"