diff options
author | fvogel <fvogelnew1@free.fr> | 2019-04-14 19:49:22 (GMT) |
---|---|---|
committer | fvogel <fvogelnew1@free.fr> | 2019-04-14 19:49:22 (GMT) |
commit | 75a78d19b6bc075bdad415daaba87bc6f6a27ecf (patch) | |
tree | 0188e3f69b8fc8b6f15f58ed2ff0bd37adb3b6e8 /library/text.tcl | |
parent | a955dbaac96f1fbdba1e1b4b197703ac45a2e5f0 (diff) | |
download | tk-75a78d19b6bc075bdad415daaba87bc6f6a27ecf.zip tk-75a78d19b6bc075bdad415daaba87bc6f6a27ecf.tar.gz tk-75a78d19b6bc075bdad415daaba87bc6f6a27ecf.tar.bz2 |
Ticket [c8ccd1899c]. Make the guard code in proc ::tk::TextUpDownLine work as intended when moving the cursor downwards. Also, fix the bug in the index returned by the displayline modifier: the first displayed index shall be returned when the index calculated by the displayline modifier would be before the start of the displayed text.
Diffstat (limited to 'library/text.tcl')
-rw-r--r-- | library/text.tcl | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/library/text.tcl b/library/text.tcl index 468696b..822f8e6 100644 --- a/library/text.tcl +++ b/library/text.tcl @@ -912,7 +912,7 @@ proc ::tk::TextUpDownLine {w n} { set lines [$w count -displaylines $Priv(textPosOrig) $i] set new [$w index \ "$Priv(textPosOrig) + [expr {$lines + $n}] displaylines"] - if {[$w compare $new == end] \ + if {[$w compare $new == "end - 1 display char"] \ || [$w compare $new == "insert display linestart"]} { set new $i } |