ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/rxvt-unicode/src/screen.C
(Generate patch)

Comparing rxvt-unicode/src/screen.C (file contents):
Revision 1.312 by root, Tue Nov 4 13:30:41 2008 UTC vs.
Revision 1.313 by root, Tue Nov 4 14:25:10 2008 UTC

132 132
133 l.l = 0; 133 l.l = 0;
134 l.f = 0; 134 l.f = 0;
135} 135}
136 136
137// nuke a single wide character at the given column
138void
139rxvt_term::scr_kill_char (line_t &l, int col) const NOTHROW
140{
141 // find begin
142 while (col > 0 && l.t[col] == NOCHAR)
143 col--;
144
145 rend_t rend = l.r[col] & ~RS_baseattrMask;
146 rend = SET_FONT (rend, FONTSET (rend)->find_font (' '));
147
148 // found begin, nuke
149 do {
150 l.t[col] = ' ';
151 l.r[col] = rend;
152 col++;
153 } while (col < ncol && l.t[col] == NOCHAR);
154}
155
137/* ------------------------------------------------------------------------- * 156/* ------------------------------------------------------------------------- *
138 * SCREEN INITIALISATION * 157 * SCREEN INITIALISATION *
139 * ------------------------------------------------------------------------- */ 158 * ------------------------------------------------------------------------- */
140 159
141void 160void
880 if (expect_false ( 899 if (expect_false (
881 line->t[screen.cur.col] == NOCHAR 900 line->t[screen.cur.col] == NOCHAR
882 || (screen.cur.col < ncol - 1 901 || (screen.cur.col < ncol - 1
883 && line->t[screen.cur.col + 1] == NOCHAR) 902 && line->t[screen.cur.col + 1] == NOCHAR)
884 )) 903 ))
885 { 904 scr_kill_char (*line, screen.cur.col);
886 int col = screen.cur.col;
887
888 // find begin
889 while (col > 0 && line->t[col] == NOCHAR)
890 col--;
891
892 rend_t rend = SET_FONT (line->r[col], FONTSET (line->r[col])->find_font (' '));
893
894 // found begin, nuke
895 do {
896 line->t[col] = ' ';
897 line->r[col] = rend;
898 col++;
899 } while (col < ncol && line->t[col] == NOCHAR);
900 }
901 905
902 rend_t rend = SET_FONT (rstyle, FONTSET (rstyle)->find_font (c)); 906 rend_t rend = SET_FONT (rstyle, FONTSET (rstyle)->find_font (c));
903 907
904 // if the character doesn't fit into the remaining columns... 908 // if the character doesn't fit into the remaining columns...
905 if (expect_false (screen.cur.col > ncol - width && ncol >= width)) 909 if (expect_false (screen.cur.col > ncol - width && ncol >= width))

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines