… | |
… | |
715 | |
715 | |
716 | // finally move the view window, if desired |
716 | // finally move the view window, if desired |
717 | if (option (Opt_scrollWithBuffer) |
717 | if (option (Opt_scrollWithBuffer) |
718 | && view_start != 0 |
718 | && view_start != 0 |
719 | && view_start != -saveLines) |
719 | && view_start != -saveLines) |
720 | scr_page (UP, count); |
720 | scr_page (count); |
721 | |
721 | |
722 | if (SHOULD_INVOKE (HOOK_SCROLL_BACK)) |
722 | if (SHOULD_INVOKE (HOOK_SCROLL_BACK)) |
723 | HOOK_INVOKE ((this, HOOK_SCROLL_BACK, DT_INT, count, DT_INT, top_row, DT_END)); |
723 | HOOK_INVOKE ((this, HOOK_SCROLL_BACK, DT_INT, count, DT_INT, top_row, DT_END)); |
724 | } |
724 | } |
725 | else |
725 | else |
… | |
… | |
1240 | * direction should be UP or DN |
1240 | * direction should be UP or DN |
1241 | */ |
1241 | */ |
1242 | void |
1242 | void |
1243 | rxvt_term::scr_index (enum page_dirn direction) NOTHROW |
1243 | rxvt_term::scr_index (enum page_dirn direction) NOTHROW |
1244 | { |
1244 | { |
1245 | int dirn; |
|
|
1246 | |
|
|
1247 | want_refresh = 1; |
1245 | want_refresh = 1; |
1248 | ZERO_SCROLLBACK (); |
1246 | ZERO_SCROLLBACK (); |
1249 | |
1247 | |
1250 | dirn = ((direction == UP) ? 1 : -1); |
|
|
1251 | |
|
|
1252 | screen.flags &= ~Screen_WrapNext; |
1248 | screen.flags &= ~Screen_WrapNext; |
1253 | |
1249 | |
1254 | if ((screen.cur.row == screen.bscroll && direction == UP) |
1250 | if ((screen.cur.row == screen.bscroll && direction == UP) |
1255 | || (screen.cur.row == screen.tscroll && direction == DN)) |
1251 | || (screen.cur.row == screen.tscroll && direction == DN)) |
1256 | scr_scroll_text (screen.tscroll, screen.bscroll, dirn); |
1252 | scr_scroll_text (screen.tscroll, screen.bscroll, direction); |
1257 | else |
1253 | else |
1258 | screen.cur.row += dirn; |
1254 | screen.cur.row += direction; |
1259 | |
1255 | |
1260 | clamp_it (screen.cur.row, 0, nrow - 1); |
1256 | clamp_it (screen.cur.row, 0, nrow - 1); |
1261 | selection_check (0); |
1257 | selection_check (0); |
1262 | } |
1258 | } |
1263 | |
1259 | |
… | |
… | |
1910 | /* |
1906 | /* |
1911 | * Page the screen up/down nlines |
1907 | * Page the screen up/down nlines |
1912 | * direction should be UP or DN |
1908 | * direction should be UP or DN |
1913 | */ |
1909 | */ |
1914 | bool |
1910 | bool |
1915 | rxvt_term::scr_page (enum page_dirn direction, int nlines) NOTHROW |
1911 | rxvt_term::scr_page (int nlines) NOTHROW |
1916 | { |
1912 | { |
1917 | int new_view_start = |
|
|
1918 | direction == UP ? view_start - nlines |
|
|
1919 | : view_start + nlines; |
|
|
1920 | |
|
|
1921 | return scr_changeview (new_view_start); |
1913 | return scr_changeview (view_start - nlines); |
1922 | } |
1914 | } |
1923 | |
1915 | |
1924 | bool |
1916 | bool |
1925 | rxvt_term::scr_changeview (int new_view_start) NOTHROW |
1917 | rxvt_term::scr_changeview (int new_view_start) NOTHROW |
1926 | { |
1918 | { |