-- Leo's gemini proxy
-- Connecting to git.thebackupbox.net:1965...
-- Connected
-- Sending request
-- Meta line: 20 text/gemini
repo: rxvt-unicode-sixel action: commit revision: path_from: revision_from: 341e15532b9131b2b6cd4bd88622240b0a0c3907: path_to: revision_to:
commit 341e15532b9131b2b6cd4bd88622240b0a0c3907 Author: Marc Lehmann <schmorp@schmorp.de> Date: Wed Mar 27 17:24:16 2013 +0000 if it breaks, the pieces will be sharp diff --git a/src/command.C b/src/command.C
--- a/src/command.C +++ b/src/command.C @@ -512,12 +512,12 @@ rxvt_term::key_press (XKeyEvent &ev) if (keysym == XK_Prior) { - scr_page (UP, lnsppg); + scr_page (lnsppg); return; } else if (keysym == XK_Next) { - scr_page (DN, lnsppg); + scr_page (-lnsppg); return; } } @@ -526,12 +526,12 @@ rxvt_term::key_press (XKeyEvent &ev) { if (keysym == XK_Up) { - scr_page (UP, 1); + scr_page (1); return; } else if (keysym == XK_Down) { - scr_page (DN, 1); + scr_page (-1); return; } } diff --git a/src/rxvt.h b/src/rxvt.h
--- a/src/rxvt.h +++ b/src/rxvt.h @@ -402,9 +402,9 @@ enum { /* modes for rxvt_term::scr_page () - scroll page. used by scrollbar window */ enum page_dirn { - UP, - DN, - NO_DIR, + DN = -1, + NO_DIR = 0, + UP = 1, }; /* arguments for rxvt_term::scr_change_screen () */ @@ -1537,7 +1537,11 @@ struct rxvt_term : zero_initialized, rxvt_vars, rxvt_screen void scr_charset_choose (int set) NOTHROW; void scr_charset_set (int set, unsigned int ch) NOTHROW; void scr_move_to (int y, int len) NOTHROW; - bool scr_page (enum page_dirn direction, int nlines) NOTHROW; + bool scr_page (int nlines) NOTHROW; + bool scr_page (enum page_dirn direction, int nlines) NOTHROW + { + scr_page (direction * nlines); + } bool scr_changeview (int new_view_start) NOTHROW; void scr_bell () NOTHROW; void scr_printscreen (int fullhist) NOTHROW; diff --git a/src/screen.C b/src/screen.C
--- a/src/screen.C +++ b/src/screen.C @@ -717,7 +717,7 @@ rxvt_term::scr_scroll_text (int row1, int row2, int count) NOTHROW if (option (Opt_scrollWithBuffer) && view_start != 0 && view_start != -saveLines) - scr_page (UP, count); + scr_page (count); if (SHOULD_INVOKE (HOOK_SCROLL_BACK)) HOOK_INVOKE ((this, HOOK_SCROLL_BACK, DT_INT, count, DT_INT, top_row, DT_END)); @@ -1912,13 +1912,9 @@ rxvt_term::scr_move_to (int y, int len) NOTHROW * direction should be UP or DN */ bool -rxvt_term::scr_page (enum page_dirn direction, int nlines) NOTHROW +rxvt_term::scr_page (int nlines) NOTHROW { - int new_view_start = - direction == UP ? view_start - nlines - : view_start + nlines; - - return scr_changeview (new_view_start); + return scr_changeview (view_start - nlines); } bool
-----END OF PAGE-----
-- Response ended
-- Page fetched on Sun Jun 2 10:40:14 2024