fix from upstream diff -ur nano-1.3.12/src/move.c nano-1.3.12-fixed/src/move.c --- nano-1.3.12/src/move.c 2006-05-21 22:08:49.000000000 -0400 +++ nano-1.3.12-fixed/src/move.c 2006-07-06 17:01:03.000000000 -0400 @@ -521,6 +521,16 @@ /* Scroll the edit window up one line. */ edit_scroll(UP, 1); + + /* If we're not on the first line of the edit window, update the + * line we were on before and the line we're on now. The former + * needs to be redrawn if we're not on the first page, and the + * latter needs to be drawn unconditionally. */ + if (openfile->current_y > 0) { + if (need_vertical_update(0)) + update_line(openfile->current->next, 0); + update_line(openfile->current, openfile->current_x); + } } #endif /* !NANO_TINY */ @@ -574,6 +584,16 @@ /* Scroll the edit window down one line. */ edit_scroll(DOWN, 1); + + /* If we're not on the last line of the edit window, update the line + * we were on before and the line we're on now. The former needs to + * be redrawn if we're not on the first page, and the latter needs + * to be drawn unconditionally. */ + if (openfile->current_y < editwinrows - 1) { + if (need_vertical_update(0)) + update_line(openfile->current->prev, 0); + update_line(openfile->current, openfile->current_x); + } } #endif /* !NANO_TINY */