--- rxvt-unicode/src/screen.C 2006/01/15 06:39:19 1.229 +++ rxvt-unicode/src/screen.C 2006/01/17 05:47:42 1.235 @@ -117,7 +117,7 @@ /* Fill part/all of a line with blanks. */ void -rxvt_term::scr_blank_line (line_t &l, unsigned int col, unsigned int width, rend_t efs) +rxvt_term::scr_blank_line (line_t &l, unsigned int col, unsigned int width, rend_t efs) const { if (!l.t) { @@ -144,7 +144,7 @@ /* ------------------------------------------------------------------------- */ /* Fill a full line with blanks - make sure it is allocated first */ void -rxvt_term::scr_blank_screen_mem (line_t &l, rend_t efs) +rxvt_term::scr_blank_screen_mem (line_t &l, rend_t efs) const { scr_blank_line (l, 0, ncol, efs); @@ -450,7 +450,7 @@ scr_reset (); scr_clear (true); - scr_refresh (SLOW_REFRESH); + scr_refresh (); } /* ------------------------------------------------------------------------- * @@ -619,8 +619,6 @@ { top_row = max (top_row - count, -saveLines); - HOOK_INVOKE ((this, HOOK_SCROLL_BACK, DT_INT, count, DT_INT, top_row, DT_END)); - // scroll everything up 'count' lines term_start = (term_start + count) % total_rows; @@ -677,6 +675,9 @@ && view_start != 0 && view_start != -saveLines) scr_page (UP, count); + + if (SHOULD_INVOKE (HOOK_SCROLL_BACK)) + HOOK_INVOKE ((this, HOOK_SCROLL_BACK, DT_INT, count, DT_INT, top_row, DT_END)); } else { @@ -1791,8 +1792,10 @@ for (i = rc[PART_BEG].row; i <= rc[PART_END].row; i++) fill_text (&drawn_buf[i].t[rc[PART_BEG].col], 0, rc[PART_END].col - rc[PART_BEG].col + 1); + num_scr_allow = 0; + if (refresh) - scr_refresh (SLOW_REFRESH); + scr_refresh (); } /* ------------------------------------------------------------------------- */ @@ -1813,9 +1816,7 @@ void rxvt_term::scr_move_to (int y, int len) { - int p = (top_row - nrow) * (len - y) / len + (nrow - 1); - - scr_changeview (p); + scr_changeview ((top_row - nrow) * (len - y) / len + (nrow - 1)); } /* ------------------------------------------------------------------------- */ @@ -1843,9 +1844,10 @@ num_scr += new_view_start - view_start; view_start = new_view_start; - HOOK_INVOKE ((this, HOOK_VIEW_CHANGE, DT_INT, view_start, DT_END)); want_refresh = 1; + HOOK_INVOKE ((this, HOOK_VIEW_CHANGE, DT_INT, view_start, DT_END)); + return true; } @@ -1937,7 +1939,7 @@ * screen.text/screen.rend contain what the screen will change to. */ void -rxvt_term::scr_refresh (unsigned char refresh_type) +rxvt_term::scr_refresh () { unsigned char must_clear, /* use draw_string not draw_image_string */ showcursor; /* show the cursor */ @@ -2071,7 +2073,6 @@ * D: CopyArea pass - very useful for slower links * This has been deliberately kept simple. */ - i = num_scr; if (!display->is_local && refresh_type == FAST_REFRESH && num_scr_allow && num_scr && abs (num_scr) < nrow && !must_clear) @@ -2079,6 +2080,7 @@ int16_t nits; int j; int len, wlen; + dLocal (int, num_scr); j = nrow; wlen = len = -1;