softwrap: when typing goes beyond the bottom row, scroll just one row

This fixes https://savannah.gnu.org/bugs/?57851.

Bug existed since version 2.8.0, when scrolling per soft-wrapped chunk
was made possible.
master
Benno Schulenberg 2020-02-18 15:35:44 +01:00
parent 8625609c2d
commit 60ae71bf3a
1 changed files with 3 additions and 1 deletions

View File

@ -1714,8 +1714,10 @@ void inject(char *burst, size_t count)
if (ISSET(SOFTWRAP) && refresh_needed == FALSE &&
(number_of_chunks_in(openfile->current) != old_amount ||
(openfile->current_y == editwinrows - 1 &&
chunk_for(xplustabs(), openfile->current) != original_row)))
chunk_for(xplustabs(), openfile->current) > original_row))) {
refresh_needed = TRUE;
focusing = FALSE;
}
#endif
openfile->placewewant = xplustabs();