screen: a full refresh is only needed when softwrap is on

When scrolling down a line, a full refresh of the edit window is only
needed when softwrap is on, because only then the movement is irregular.
When each file line takes up just one screen line (softwrap is off),
edit_scroll() is perfectly able to scroll and redraw only the necessary
lines.

(But... when doing a full refresh anyway with softwrap, why bother
scrolling at all?  Why not just adjust edittop and call refresh?)
master
Benno Schulenberg 2016-04-11 22:22:15 +02:00
parent 111b30008a
commit 9d7930328b
1 changed files with 2 additions and 1 deletions

View File

@ -495,7 +495,8 @@ void do_down(
(ISSET(SMOOTH_SCROLL) || scroll_only) ? amount :
#endif
editwinrows / 2 + 1);
edit_refresh_needed = TRUE;
if (ISSET(SOFTWRAP))
edit_refresh_needed = TRUE;
}
/* If we're above the last line of the edit window, update the line
* we were on before and the line we're on now. The former needs to