moving: don't try to redraw lines that have gone outside the viewport
When scrolling backward, it is not just the bottom line of the screen that doesn't need to be redrawn: also the line /before/ the top line doesn't need a redraw. Mutatis mutandis for scrolling forward. This fixes https://savannah.gnu.org/bugs/?50657.
Этот коммит содержится в:
родитель
244a503ddc
Коммит
9cf980700c
@ -489,7 +489,7 @@ void do_up(bool scroll_only)
|
||||
1 : editwinrows / 2 + 1);
|
||||
|
||||
/* If the lines weren't already redrawn, see if they need to be. */
|
||||
if (openfile->current_y > 0) {
|
||||
if (openfile->current_y > 0 && openfile->current_y < editwinrows - 1) {
|
||||
/* Redraw the prior line if it's not actually the same line as the
|
||||
* current one (which it might be in softwrap mode, if we moved just
|
||||
* one chunk) and the line was horizontally scrolled. */
|
||||
@ -545,7 +545,7 @@ void do_down(bool scroll_only)
|
||||
1 : editwinrows / 2 + 1);
|
||||
|
||||
/* If the lines weren't already redrawn, see if they need to be. */
|
||||
if (openfile->current_y < editwinrows - 1) {
|
||||
if (openfile->current_y > 0 && openfile->current_y < editwinrows - 1) {
|
||||
/* Redraw the prior line if it's not actually the same line as the
|
||||
* current one (which it might be in softwrap mode, if we moved just
|
||||
* one chunk) and the line was horizontally scrolled. */
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user