--- src/vte.c.orig 2006-03-12 19:29:08.000000000 -0800 +++ src/vte.c 2006-03-18 10:59:08.000000000 -0800 @@ -1498,20 +1498,20 @@ } } -/* Scroll up or down in the current screen. */ +/* Scroll a fixed number of lines up or down, in the current screen. */ static void -vte_terminal_scroll_pages(VteTerminal *terminal, gint pages) +vte_terminal_scroll_lines(VteTerminal *terminal, gint lines) { glong destination; g_assert(VTE_IS_TERMINAL(terminal)); #ifdef VTE_DEBUG if (_vte_debug_on(VTE_DEBUG_IO)) { - fprintf(stderr, "Scrolling %d pages.\n", pages); + fprintf(stderr, "Scrolling %d lines.\n", lines); } #endif /* Calculate the ideal position where we want to be before clamping. */ destination = floor(gtk_adjustment_get_value(terminal->adjustment)); - destination += (pages * terminal->row_count); + destination += lines; /* Can't scroll past data we have. */ destination = CLAMP(destination, terminal->adjustment->lower, @@ -1524,6 +1524,13 @@ _vte_terminal_emit_contents_changed(terminal); } +/* Scroll a fixed number of pages up or down, in the current screen. */ +static void +vte_terminal_scroll_pages(VteTerminal *terminal, gint pages) +{ + vte_terminal_scroll_lines(terminal, pages * terminal->row_count); +} + /* Scroll so that the scroll delta is the minimum value. */ static void vte_terminal_maybe_scroll_to_top(VteTerminal *terminal) @@ -3966,6 +3973,24 @@ } break; /* Keypad/motion keys. */ + case GDK_KP_Up: + case GDK_Up: + if (terminal->pvt->modifiers & GDK_SHIFT_MASK) { + vte_terminal_scroll_lines(terminal, -1); + scrolled = TRUE; + handled = TRUE; + suppress_meta_esc = TRUE; + } + break; + case GDK_KP_Down: + case GDK_Down: + if (terminal->pvt->modifiers & GDK_SHIFT_MASK) { + vte_terminal_scroll_lines(terminal, 1); + scrolled = TRUE; + handled = TRUE; + suppress_meta_esc = TRUE; + } + break; case GDK_KP_Page_Up: case GDK_Page_Up: if (terminal->pvt->modifiers & GDK_SHIFT_MASK) {