From: Benno Schulenberg Date: Sat, 28 Mar 2015 17:11:28 +0000 (+0000) Subject: Only scrolling the required number of lines X-Git-Tag: v2.4.1~26 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=7fe830fd205968c729ec2520e8384421209cc237;p=nano.git Only scrolling the required number of lines when pasting lines onto the bottom line. git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5171 35c25a1d-7b9e-4130-9fde-d3aeb78583b8 --- diff --git a/ChangeLog b/ChangeLog index 241e8ef7..9d8cc481 100644 --- a/ChangeLog +++ b/ChangeLog @@ -4,6 +4,9 @@ an off-screen string, put it on the center line of the screen and not on the bottom or top line. This restores the old behaviour that was unintentionally changed in r5149 six days ago. + * src/winio.c (edit_refresh): When pasting lines on the bottom line, + only scroll the required number of lines and not half a screen -- + that is, when smooth scrolling is enabled. 2015-03-27 Mark Majeres * src/text.c (do_alt_speller): Adjust the end point of the marked diff --git a/src/winio.c b/src/winio.c index a1e30212..12bc2de8 100644 --- a/src/winio.c +++ b/src/winio.c @@ -3228,7 +3228,7 @@ void edit_refresh(void) #endif /* Make sure the current line is on the screen. */ - edit_update(CENTER); + edit_update(ISSET(SMOOTH_SCROLL) ? NONE : CENTER); } foo = openfile->edittop;