commit ca538e6f08479842147e217c56cb7bced52dd8be
parent 4b26308b6ae1f22cb8782a711ec28ed0fddf55c5
Author: Benno Schulenberg <bensberg@telfort.nl>
Date: Sun, 13 May 2018 19:24:58 +0200
scrolling: only do a scroll when the edit window has more than one row
If the edit window consists of a single row, then the do_up() call has
already brought the desired line into view -- which means that trying
to scroll then (when already on the first line of the file) would fail.
This fixes https://savannah.gnu.org/bugs/?53891.
Diffstat:
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/move.c b/src/move.c
@@ -554,7 +554,8 @@ void do_scroll_up(void)
if (openfile->current_y == editwinrows - 1)
do_up();
- edit_scroll(BACKWARD);
+ if (editwinrows > 1)
+ edit_scroll(BACKWARD);
}
/* Scroll down one line or chunk without scrolling the cursor. */