--- rxvt-unicode/src/screen.C 2008/11/05 00:01:01 1.324 +++ rxvt-unicode/src/screen.C 2008/11/05 12:28:15 1.325 @@ -160,8 +160,6 @@ void rxvt_term::scr_reset () { - scr_soft_reset (); - view_start = 0; num_scr = 0; @@ -282,6 +280,7 @@ { // Re-wrap lines. This is rather ugly, possibly because I am too dumb // to come up with a lean and mean algorithm. + // TODO: maybe optimise when width didn't change row_col_t ocur = screen.cur; ocur.row = MOD (term_start + ocur.row, prev_total_rows); @@ -438,6 +437,8 @@ { scr_release (); prev_nrow = prev_ncol = 0; + rvideo_mode = false; + scr_soft_reset (); scr_reset (); scr_clear (true); @@ -452,8 +453,6 @@ scr_overlay_off (); #endif - rvideo_mode = false; - if (current_screen != PRIMARY) scr_swap_screen (); @@ -1543,8 +1542,7 @@ line->r[col] = line->r[col + count]; } - scr_blank_line (*line, ncol - count, count, - line->r[ncol - 1] & (RS_fgMask | RS_bgMask | RS_baseattrMask)); + scr_blank_line (*line, ncol - count, count, rstyle); if (selection.op && current_screen == selection.screen && ROWCOL_IN_ROW_AT_OR_AFTER (selection.beg, screen.cur))