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.247 by root, Sun Jan 22 20:39:47 2006 UTC vs.
Revision 1.250 by root, Wed Jan 25 13:24:45 2006 UTC

758 ZERO_SCROLLBACK (); 758 ZERO_SCROLLBACK ();
759 759
760 if (minlines > 0) 760 if (minlines > 0)
761 { 761 {
762 minlines += screen.cur.row - screen.bscroll; 762 minlines += screen.cur.row - screen.bscroll;
763 min_it (minlines, screen.cur.row - top_row);
763 764
764 if (minlines > 0 765 if (minlines > 0
765 && screen.tscroll == 0 766 && screen.tscroll == 0
766 && screen.bscroll == nrow - 1) 767 && screen.bscroll == nrow - 1)
767 { 768 {
841 842
842 // some utf-8 decoders "decode" surrogate characters: let's fix this. 843 // some utf-8 decoders "decode" surrogate characters: let's fix this.
843 if (IN_RANGE_INC (c, 0xd800, 0xdfff)) 844 if (IN_RANGE_INC (c, 0xd800, 0xdfff))
844 c = 0xfffd; 845 c = 0xfffd;
845 846
846 // rely on wcwidth to tell us the character width, at least for non-latin1 847 // rely on wcwidth to tell us the character width, do wcwidth before
847 // do wcwidth before further replacements, as wcwidth might return -1 848 // further replacements, as wcwidth might return -1 for the line
848 // for the line drawing characters below as they might be invalid in the current 849 // drawing characters below as they might be invalid in the current
849 // locale. 850 // locale.
850 int width = c < 0x100 ? 1 : wcwidth (c); 851 int width = WCWIDTH (c);
851 852
852 if (charsets [screen.charset] == '0') // DEC SPECIAL 853 if (charsets [screen.charset] == '0') // DEC SPECIAL
853 { 854 {
854 // vt100 special graphics and line drawing 855 // vt100 special graphics and line drawing
855 // 5f-7e standard vt100 856 // 5f-7e standard vt100
2243 2244
2244 // only do special processing if any attributes are set, which is unlikely 2245 // only do special processing if any attributes are set, which is unlikely
2245 if (rend & (RS_Bold | RS_Italic | RS_Uline | RS_RVid | RS_Blink | RS_Careful)) 2246 if (rend & (RS_Bold | RS_Italic | RS_Uline | RS_RVid | RS_Blink | RS_Careful))
2246 { 2247 {
2247#if ENABLE_STYLES 2248#if ENABLE_STYLES
2248 // force redraw after "careful" characters to avoid pixel droppings 2249 // "careful" (too wide) character handling
2249 if (srp[col] & RS_Careful && col < ncol - 1 && 0)
2250 drp[col + 1] = ~srp[col + 1];
2251 2250
2252 // include previous careful character(s) if possible, looks nicer (best effort...) 2251 // include previous careful character(s) if possible, looks nicer (best effort...)
2253 while (text > stp 2252 while (text > stp
2254 && srp[text - stp - 1] & RS_Careful 2253 && srp[text - stp - 1] & RS_Careful
2255 && RS_SAME (rend, srp[text - stp - 1])) 2254 && RS_SAME (rend, srp[text - stp - 1]))
2256 text--, count++, xpixel -= fwidth; 2255 text--, count++, xpixel -= fwidth;
2256
2257 // force redraw after "careful" characters to avoid pixel droppings
2258 for (int i = 0; srp[col + i] & RS_Careful && col + i < ncol - 1; i++)
2259 drp[col + i + 1] = ~srp[col + i + 1];
2260
2261 // force redraw before "careful" characters to avoid pixel droppings
2262 for (int i = 0; srp[text - stp - i] & RS_Careful && text - i > stp; i++)
2263 drp[text - stp - i - 1] = ~srp[text - stp - i - 1];
2257#endif 2264#endif
2258 2265
2259 bool invert = rend & RS_RVid; 2266 bool invert = rend & RS_RVid;
2260 2267
2261#ifndef NO_BOLD_UNDERLINE_REVERSE 2268#ifndef NO_BOLD_UNDERLINE_REVERSE
3763rxvt_term::scr_overlay_set (int x, int y, const wchar_t *s) NOTHROW 3770rxvt_term::scr_overlay_set (int x, int y, const wchar_t *s) NOTHROW
3764{ 3771{
3765 while (*s) 3772 while (*s)
3766 { 3773 {
3767 text_t t = *s++; 3774 text_t t = *s++;
3768 int width = wcwidth (t); 3775 int width = WCWIDTH (t);
3769 3776
3770 while (width--) 3777 while (width--)
3771 { 3778 {
3772 scr_overlay_set (x++, y, t); 3779 scr_overlay_set (x++, y, t);
3773 t = NOCHAR; 3780 t = NOCHAR;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines