Index: src/move.c =================================================================== RCS file: /cvsroot/nano/nano/src/move.c,v retrieving revision 1.47 diff -u -p -r1.47 move.c --- src/move.c 13 Sep 2005 04:53:44 -0000 1.47 +++ src/move.c 24 Sep 2005 03:30:35 -0000 @@ -474,7 +474,7 @@ void do_end(void) update_line(openfile->current, openfile->current_x); } -void do_up(void) +static void _do_up(int force) { check_statusblank(); @@ -496,7 +496,7 @@ void do_up(void) /* If we're on the first line of the edit window, scroll the edit * window up one line if we're in smooth scrolling mode, or up half * a page if we're not. */ - if (openfile->current_y == 0) + if (force || openfile->current_y == 0) edit_scroll(UP, #ifndef NANO_SMALL ISSET(SMOOTH_SCROLL) ? 1 : @@ -511,8 +511,10 @@ void do_up(void) update_line(openfile->current, openfile->current_x); } } +void do_up(void) { _do_up(0); } +void do_up_force(void) { _do_up(1); } -void do_down(void) +static void _do_down(int force) { check_statusblank(); @@ -534,7 +536,7 @@ void do_down(void) /* If we're on the last line of the edit window, scroll the edit * window down one line if we're in smooth scrolling mode, or down * half a page if we're not. */ - if (openfile->current_y == editwinrows - 1) + if (force || openfile->current_y == editwinrows - 1) edit_scroll(DOWN, #ifndef NANO_SMALL ISSET(SMOOTH_SCROLL) ? 1 : @@ -549,6 +551,8 @@ void do_down(void) update_line(openfile->current, openfile->current_x); } } +void do_down(void) { _do_down(0); } +void do_down_force(void) { _do_down(1); } void do_left(void) { Index: src/winio.c =================================================================== RCS file: /cvsroot/nano/nano/src/winio.c,v retrieving revision 1.437 diff -u -p -r1.437 winio.c --- src/winio.c 20 Sep 2005 04:15:33 -0000 1.437 +++ src/winio.c 24 Sep 2005 03:30:36 -0000 @@ -508,6 +507,14 @@ int parse_kbinput(WINDOW *win, bool *met escapes = 0; if (get_key_buffer_len() == 0) { *meta_key = TRUE; + switch (*kbinput) { + case KEY_DOWN: + do_down_force(); + break; + case KEY_UP: + do_up_force(); + break; + } retval = tolower(*kbinput); } else { int *seq;