diff options
author | fvogel <fvogelnew1@free.fr> | 2019-04-14 19:55:33 (GMT) |
---|---|---|
committer | fvogel <fvogelnew1@free.fr> | 2019-04-14 19:55:33 (GMT) |
commit | 8550afdcfc409d1fa37e7d64832bceca4be6a9b0 (patch) | |
tree | 2bc5df59d6f127e5d84248b11c7a103a812e3557 /library | |
parent | 75a78d19b6bc075bdad415daaba87bc6f6a27ecf (diff) | |
download | tk-8550afdcfc409d1fa37e7d64832bceca4be6a9b0.zip tk-8550afdcfc409d1fa37e7d64832bceca4be6a9b0.tar.gz tk-8550afdcfc409d1fa37e7d64832bceca4be6a9b0.tar.bz2 |
Remove the guard code in proc ::tk::TextUpDownLine in order to get the behavior requested in [c8ccd1899c]
Diffstat (limited to 'library')
-rw-r--r-- | library/text.tcl | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/library/text.tcl b/library/text.tcl index 822f8e6..e07bb62 100644 --- a/library/text.tcl +++ b/library/text.tcl @@ -891,11 +891,10 @@ proc ::tk::TextInsert {w s} { # ::tk::TextUpDownLine -- # Returns the index of the character one display line above or below the -# insertion cursor. There are two tricky things here. First, we want to -# maintain the original x position across repeated operations, even though -# some lines that will get passed through don't have enough characters to -# cover the original column. Second, don't try to scroll past the -# beginning or end of the text. +# insertion cursor. There is a tricky thing here: we want to maintain the +# original x position across repeated operations, even though some lines +# that will get passed through don't have enough characters to cover the +# original column. # # Arguments: # w - The text window in which the cursor is to move. @@ -912,10 +911,6 @@ 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 - 1 display char"] \ - || [$w compare $new == "insert display linestart"]} { - set new $i - } set Priv(prevPos) $new return $new } |