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.master
parent
4b26308b6a
commit
ca538e6f08
|
@ -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. */
|
||||
|
|
Loading…
Reference in New Issue