--- rxvt-unicode/src/screen.C 2006/01/16 06:37:52 1.233 +++ rxvt-unicode/src/screen.C 2006/01/19 16:22:13 1.238 @@ -450,7 +450,7 @@ scr_reset (); scr_clear (true); - scr_refresh (SLOW_REFRESH); + scr_refresh (); } /* ------------------------------------------------------------------------- * @@ -619,24 +619,22 @@ { 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; + // sever bottommost line { - // severe bottommost scrolled line line_t &l = ROW(row2 - count); - l.touch (); l.is_longer (0); + l.touch (); } - // erase newly scorlled-in lines - for (int i = count; i; --i ) + // erase newly scrolled-in lines + for (int i = count; i--; ) { // basically this is a slightly optimized scr_blank_screen_mem // it is worth the effort on slower machines - line_t &l = ROW(nrow - i); + line_t &l = ROW(nrow - 1 - i); scr_blank_line (l, 0, l.l, rstyle); @@ -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 { @@ -818,11 +819,11 @@ if (screen.flags & Screen_WrapNext) { - max_it (line->l, ncol); - line->is_longer (1); - scr_do_wrap (); + line->l = ncol; + line->is_longer (1); + row = screen.cur.row; line = &ROW(row); /* _must_ refresh */ } @@ -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 (); } /* ------------------------------------------------------------------------- */ @@ -1841,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; } @@ -1935,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 */ @@ -2069,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) @@ -2077,6 +2080,7 @@ int16_t nits; int j; int len, wlen; + dLocal (int, num_scr); j = nrow; wlen = len = -1; @@ -2798,11 +2802,8 @@ * EXT: button 2 release */ void -rxvt_term::selection_request (Time tm, int x, int y) +rxvt_term::selection_request (Time tm) { - if (x < 0 || x >= width || y < 0 || y >= height) - return; /* outside window */ - if (selection.text) { /* internal selection */ char *str = rxvt_wcstombs (selection.text, selection.len);