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

Comparing rxvt-unicode/src/rxvtperl.xs (file contents):
Revision 1.102 by root, Thu Jul 6 23:48:11 2006 UTC vs.
Revision 1.105 by root, Mon Aug 21 15:11:46 2006 UTC

268}; 268};
269 269
270overlay::overlay (rxvt_term *THIS, int x_, int y_, int w_, int h_, rend_t rstyle, int border) 270overlay::overlay (rxvt_term *THIS, int x_, int y_, int w_, int h_, rend_t rstyle, int border)
271: THIS(THIS), x(x_), y(y_), w(w_), h(h_), border(border == 2), overlay_av (0) 271: THIS(THIS), x(x_), y(y_), w(w_), h(h_), border(border == 2), overlay_av (0)
272{ 272{
273 if (w < 0) w = 0;
274 if (h < 0) h = 0;
275
273 if (border == 2) 276 if (border == 2)
274 { 277 {
275 w += 2; 278 w += 2;
276 h += 2; 279 h += 2;
277 } 280 }
1119 CODE: 1122 CODE:
1120{ 1123{
1121 wchar_t *wstr = sv2wcs (str); 1124 wchar_t *wstr = sv2wcs (str);
1122 1125
1123 rxvt_push_locale (THIS->locale); 1126 rxvt_push_locale (THIS->locale);
1124 RETVAL = wcswidth (wstr, wcslen (wstr)); 1127 RETVAL = 0;
1128 for (wchar_t *wc = wstr; *wc; wc++)
1129 {
1130 int w = WCWIDTH (*wc);
1131
1132 if (w)
1133 RETVAL += min (w, 1);
1134 }
1125 rxvt_pop_locale (); 1135 rxvt_pop_locale ();
1126 1136
1127 free (wstr); 1137 free (wstr);
1128} 1138}
1129 OUTPUT: 1139 OUTPUT:

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines