2009-11-26 Chris Allegretta <chrisa@asty.org>

* winio.c (edit_scroll): Adjust for long lines when scrolling.                    



git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4444 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
master
Chris Allegretta 2009-11-27 03:04:59 +00:00
parent d753efdb55
commit 3b830ee194
3 changed files with 7 additions and 1 deletions

View File

@ -1,3 +1,6 @@
2009-11-26 Chris Allegretta <chrisa@asty.org>
* winio.c (edit_scroll): Adjust for long lines when scrolling.
2009-11-26 Jordi Mallach <jordi@gnu.org> 2009-11-26 Jordi Mallach <jordi@gnu.org>
* doc/man/*: Update all man pages to escape unescapred hyphens. * doc/man/*: Update all man pages to escape unescapred hyphens.

View File

@ -133,7 +133,7 @@ void do_page_down(void)
openfile->placewewant); openfile->placewewant);
/* Scroll the edit window down a page. */ /* Scroll the edit window down a page. */
edit_scroll(DOWN_DIR, maxrows - 2); edit_scroll(DOWN_DIR, editwinrows - 2);
} }
#ifndef DISABLE_JUSTIFY #ifndef DISABLE_JUSTIFY

View File

@ -3038,6 +3038,9 @@ void edit_scroll(scroll_dir direction, ssize_t nlines)
break; break;
openfile->edittop = openfile->edittop->next; openfile->edittop = openfile->edittop->next;
} }
/* Don't over-scroll on long lines */
if (ISSET(SOFTWRAP))
i -= strlenpt(openfile->edittop->data) / COLS;
} }
compute_maxrows(); compute_maxrows();