mirror of
git://git.sv.gnu.org/nano.git
synced 2024-12-03 18:02:54 +03:00
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?)
This commit is contained in:
parent
111b30008a
commit
9d7930328b
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user