mirror of
git://git.sv.gnu.org/nano.git
synced 2025-03-11 03:01:38 +03:00
scrolling: don't overscroll when the edit window has just one row
If the edit window consists of a single row, then the do_down() call has already brought the desired line or chunk into view -- no attempt should then be made to scroll the screen further. This fixes https://savannah.gnu.org/bugs/?56553. Bug existed since version 2.9.6, commit 0d9080a2.
This commit is contained in:
parent
8cd6aa0a32
commit
5cfb74650d
@ -554,12 +554,12 @@ void do_scroll_down(void)
|
||||
if (openfile->current_y == 0)
|
||||
do_down();
|
||||
|
||||
if (openfile->edittop->next != NULL
|
||||
if (editwinrows > 1 && (openfile->edittop->next != NULL
|
||||
#ifndef NANO_TINY
|
||||
|| chunk_for(openfile->firstcolumn, openfile->edittop) <
|
||||
number_of_chunks_in(openfile->edittop)
|
||||
#endif
|
||||
)
|
||||
))
|
||||
edit_scroll(FORWARD);
|
||||
}
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user