file with fewer than nlines lines available to scroll would leave half
the screen unupdated
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2880
35c25a1d-7b9e-4130-9fde-
d3aeb78583b8
wscrl(edit, (direction == UP) ? -nlines : nlines);
scrollok(edit, FALSE);
+ /* If we scrolled up, we couldn't scroll up all nlines lines, and
+ * we're now at the top of the file, we need to treat the entire
+ * screen as the scrolled region, instead of just the top nlines
+ * lines. */
+ if (direction == UP && i > 0 && openfile->edittop ==
+ openfile->fileage)
+ nlines = editwinrows;
+
/* Add two to nlines, to account for the lines before and after the
* scrolled region. */
nlines += 2;