… | |
… | |
115 | * SCREEN `COMMON' ROUTINES * |
115 | * SCREEN `COMMON' ROUTINES * |
116 | * ------------------------------------------------------------------------- */ |
116 | * ------------------------------------------------------------------------- */ |
117 | |
117 | |
118 | /* Fill part/all of a line with blanks. */ |
118 | /* Fill part/all of a line with blanks. */ |
119 | void |
119 | void |
120 | rxvt_term::scr_blank_line (line_t &l, unsigned int col, unsigned int width, rend_t efs) |
120 | rxvt_term::scr_blank_line (line_t &l, unsigned int col, unsigned int width, rend_t efs) const |
121 | { |
121 | { |
122 | if (!l.t) |
122 | if (!l.t) |
123 | { |
123 | { |
124 | lalloc (l); |
124 | lalloc (l); |
125 | col = 0; |
125 | col = 0; |
… | |
… | |
142 | } |
142 | } |
143 | |
143 | |
144 | /* ------------------------------------------------------------------------- */ |
144 | /* ------------------------------------------------------------------------- */ |
145 | /* Fill a full line with blanks - make sure it is allocated first */ |
145 | /* Fill a full line with blanks - make sure it is allocated first */ |
146 | void |
146 | void |
147 | rxvt_term::scr_blank_screen_mem (line_t &l, rend_t efs) |
147 | rxvt_term::scr_blank_screen_mem (line_t &l, rend_t efs) const |
148 | { |
148 | { |
149 | scr_blank_line (l, 0, ncol, efs); |
149 | scr_blank_line (l, 0, ncol, efs); |
150 | |
150 | |
151 | l.l = 0; |
151 | l.l = 0; |
152 | l.f = 0; |
152 | l.f = 0; |
… | |
… | |
617 | && row1 == 0 |
617 | && row1 == 0 |
618 | && (current_screen == PRIMARY || OPTION (Opt_secondaryScroll))) |
618 | && (current_screen == PRIMARY || OPTION (Opt_secondaryScroll))) |
619 | { |
619 | { |
620 | top_row = max (top_row - count, -saveLines); |
620 | top_row = max (top_row - count, -saveLines); |
621 | |
621 | |
622 | HOOK_INVOKE ((this, HOOK_SCROLL_BACK, DT_INT, count, DT_INT, top_row, DT_END)); |
|
|
623 | |
|
|
624 | // scroll everything up 'count' lines |
622 | // scroll everything up 'count' lines |
625 | term_start = (term_start + count) % total_rows; |
623 | term_start = (term_start + count) % total_rows; |
626 | |
624 | |
627 | { |
625 | { |
628 | // severe bottommost scrolled line |
626 | // severe bottommost scrolled line |
… | |
… | |
675 | // finally move the view window, if desired |
673 | // finally move the view window, if desired |
676 | if (OPTION (Opt_scrollWithBuffer) |
674 | if (OPTION (Opt_scrollWithBuffer) |
677 | && view_start != 0 |
675 | && view_start != 0 |
678 | && view_start != -saveLines) |
676 | && view_start != -saveLines) |
679 | scr_page (UP, count); |
677 | scr_page (UP, count); |
|
|
678 | |
|
|
679 | if (SHOULD_INVOKE (HOOK_SCROLL_BACK)) |
|
|
680 | HOOK_INVOKE ((this, HOOK_SCROLL_BACK, DT_INT, count, DT_INT, top_row, DT_END)); |
680 | } |
681 | } |
681 | else |
682 | else |
682 | { |
683 | { |
683 | if (selection.op && current_screen == selection.screen) |
684 | if (selection.op && current_screen == selection.screen) |
684 | { |
685 | { |
… | |
… | |
1839 | if (new_view_start == view_start) |
1840 | if (new_view_start == view_start) |
1840 | return false; |
1841 | return false; |
1841 | |
1842 | |
1842 | num_scr += new_view_start - view_start; |
1843 | num_scr += new_view_start - view_start; |
1843 | view_start = new_view_start; |
1844 | view_start = new_view_start; |
|
|
1845 | want_refresh = 1; |
|
|
1846 | |
1844 | HOOK_INVOKE ((this, HOOK_VIEW_CHANGE, DT_INT, view_start, DT_END)); |
1847 | HOOK_INVOKE ((this, HOOK_VIEW_CHANGE, DT_INT, view_start, DT_END)); |
1845 | want_refresh = 1; |
|
|
1846 | |
1848 | |
1847 | return true; |
1849 | return true; |
1848 | } |
1850 | } |
1849 | |
1851 | |
1850 | /* ------------------------------------------------------------------------- */ |
1852 | /* ------------------------------------------------------------------------- */ |