… | |
… | |
268 | }; |
268 | }; |
269 | |
269 | |
270 | overlay::overlay (rxvt_term *THIS, int x_, int y_, int w_, int h_, rend_t rstyle, int border) |
270 | overlay::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); |
|
|
1127 | //TODO: use same algorithm as screen.C |
1124 | RETVAL = wcswidth (wstr, wcslen (wstr)); |
1128 | RETVAL = wcswidth (wstr, wcslen (wstr)); |
1125 | rxvt_pop_locale (); |
1129 | rxvt_pop_locale (); |
1126 | |
1130 | |
1127 | free (wstr); |
1131 | free (wstr); |
1128 | } |
1132 | } |