edit_redraw() should update when we're not on the first page and/or when

we're not on the same page as before, not just in the former case


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1796 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
This commit is contained in:
David Lawrence Ramsey 2004-06-01 18:32:36 +00:00
parent 0675c2f355
commit ce1d7652f3
2 changed files with 7 additions and 5 deletions

View File

@ -90,7 +90,8 @@ CVS code -
do_right_void(), need_horizontal_update(),
need_vertical_update(), edit_scroll(), and edit_redraw(). All
of these functions but the first two require the previous
versions of current and/or placewewant as parameters. Also
versions of current and/or placewewant as parameters, so that
they can redraw properly when the location has changed. Also
rename the int refresh in do_delete() and do_backspace() to
do_refresh so as not to conflict with refresh(). (DLR)
- Add some comments better explaining what is disabled in

View File

@ -2610,7 +2610,8 @@ void edit_scroll(updown direction, int nlines)
* updated. */
void edit_redraw(const filestruct *old_current, int old_pww)
{
int do_refresh = need_vertical_update(old_pww);
int do_refresh = need_vertical_update(0) ||
need_vertical_update(old_pww);
const filestruct *foo;
/* If either old_current or current is offscreen, refresh the screen
@ -2623,9 +2624,9 @@ void edit_redraw(const filestruct *old_current, int old_pww)
return;
}
/* Update old_current and current if we're not on the first page.
* If the mark is on, update all the lines between old_current and
* current too. */
/* Update old_current and current if we're not on the first page
* and/or we're not on the same page as before. If the mark is on,
* update all the lines between old_current and current too. */
foo = old_current;
while (foo != current) {
if (do_refresh)