--- rxvt-unicode/src/screen.C 2008/11/04 13:30:41 1.312 +++ rxvt-unicode/src/screen.C 2008/11/04 14:25:10 1.313 @@ -134,6 +134,25 @@ l.f = 0; } +// nuke a single wide character at the given column +void +rxvt_term::scr_kill_char (line_t &l, int col) const NOTHROW +{ + // find begin + while (col > 0 && l.t[col] == NOCHAR) + col--; + + rend_t rend = l.r[col] & ~RS_baseattrMask; + rend = SET_FONT (rend, FONTSET (rend)->find_font (' ')); + + // found begin, nuke + do { + l.t[col] = ' '; + l.r[col] = rend; + col++; + } while (col < ncol && l.t[col] == NOCHAR); +} + /* ------------------------------------------------------------------------- * * SCREEN INITIALISATION * * ------------------------------------------------------------------------- */ @@ -882,22 +901,7 @@ || (screen.cur.col < ncol - 1 && line->t[screen.cur.col + 1] == NOCHAR) )) - { - int col = screen.cur.col; - - // find begin - while (col > 0 && line->t[col] == NOCHAR) - col--; - - rend_t rend = SET_FONT (line->r[col], FONTSET (line->r[col])->find_font (' ')); - - // found begin, nuke - do { - line->t[col] = ' '; - line->r[col] = rend; - col++; - } while (col < ncol && line->t[col] == NOCHAR); - } + scr_kill_char (*line, screen.cur.col); rend_t rend = SET_FONT (rstyle, FONTSET (rstyle)->find_font (c));