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
* 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
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)