Commit de0c5eb8 authored by David Lawrence Ramsey's avatar David Lawrence Ramsey
Browse files

better edit_scroll() redundancy fix

git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2885 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
No related merge requests found
Showing with 3 additions and 2 deletions
+3 -2
...@@ -3546,8 +3546,9 @@ void edit_scroll(updown direction, int nlines) ...@@ -3546,8 +3546,9 @@ void edit_scroll(updown direction, int nlines)
/* Make nlines account for the lines before and after the scrolled /* Make nlines account for the lines before and after the scrolled
* region, if they're onsccreen. */ * region, if they're onsccreen. */
nlines += (nlines <= editwinrows - 2) ? 2 : nlines += 2;
(nlines == editwinrows - 1) ? 1 : 0; if (nlines > editwinrows)
nlines = editwinrows;
/* If we scrolled up, we're on the line before the scrolled /* If we scrolled up, we're on the line before the scrolled
* region. */ * region. */
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment