--- rxvt-unicode/src/screen.C 2006/01/27 18:36:43 1.253 +++ rxvt-unicode/src/screen.C 2006/01/28 14:23:16 1.254 @@ -128,7 +128,7 @@ l.touch (); - efs &= ~RS_baseattrMask; + efs &= ~RS_baseattrMask; // remove italic etc. fontstyles efs = SET_FONT (efs, FONTSET (efs)->find_font (' ')); text_t *et = l.t + col; @@ -642,7 +642,20 @@ // erase newly scrolled-in lines for (int i = count; i--; ) - scr_blank_screen_mem (ROW(nrow - 1 - i), rstyle); + { + line_t &l = ROW(nrow - 1 - i); + + // optimize if already cleared, can be significant on slow machines + // could be rolled into scr_blank_screen_mem + if (l.r && l.l < ncol - 1 && !((l.r[l.l + 1] ^ rstyle) & RS_bgMask)) + { + scr_blank_line (l, 0, l.l, rstyle); + l.l = 0; + l.f = 0; + } + else + scr_blank_screen_mem (l, rstyle); + } // now copy lines below the scroll region bottom to the // bottom of the screen again, so they look as if they