--- rxvt-unicode/src/screen.C 2008/11/05 12:28:15 1.325 +++ rxvt-unicode/src/screen.C 2008/11/05 13:04:51 1.326 @@ -396,6 +396,12 @@ clamp_it (screen.cur.col, 0, ncol - 1); } + free (tabs); + tabs = (char *)rxvt_malloc (ncol); + + for (int col = ncol; --col; ) + tabs [col] = col % TABSIZE == 0; + CLEAR_ALL_SELECTION (); prev_nrow = nrow; @@ -456,12 +462,6 @@ if (current_screen != PRIMARY) scr_swap_screen (); - free (tabs); - tabs = (char *)rxvt_malloc (ncol); - - for (int col = ncol; --col; ) - tabs [col] = col % TABSIZE == 0; - scr_scroll_region (0, MAX_ROWS - 1); scr_rendition (0, ~RS_None); scr_insert_mode (0);