commit ce1d7652f330bf54446740b0a43b5ae44cd57bb7
parent 0675c2f35500593936d506a357e396f83f8238ba
Author: David Lawrence Ramsey <pooka109@gmail.com>
Date: Tue, 1 Jun 2004 18:32:36 +0000
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
Diffstat:
2 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/ChangeLog b/ChangeLog
@@ -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
diff --git a/src/winio.c b/src/winio.c
@@ -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)