diff options
author | fvogel <fvogelnew1@free.fr> | 2023-04-21 19:08:38 (GMT) |
---|---|---|
committer | fvogel <fvogelnew1@free.fr> | 2023-04-21 19:08:38 (GMT) |
commit | 25a9c6e4355f8d478a3f8ffbe379a055cf6c9632 (patch) | |
tree | b5f941867475956363ece0cb5445ee5b8248e7e8 /library | |
parent | 5f6a18aadac87bb6d56f2137e485c76693320ef2 (diff) | |
download | tk-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.tcl | 3 |
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" |