diff --git a/src/winio.c b/src/winio.c index a0d8318a..fe690a89 100644 --- a/src/winio.c +++ b/src/winio.c @@ -3546,10 +3546,7 @@ void edit_scroll(updown direction, int nlines) * If the scrolled region contains more than one line, and the lines * before and after the scrolled region are visible in the edit * window, we need to draw them too. */ - if (nlines == 1) - nlines++; - else - nlines += 2; + nlines += (nlines == 1) ? 1 : 2; if (nlines > editwinrows) nlines = editwinrows;