… | |
… | |
2433 | #endif |
2433 | #endif |
2434 | } |
2434 | } |
2435 | } |
2435 | } |
2436 | else if (oldcursor.row >= 0) |
2436 | else if (oldcursor.row >= 0) |
2437 | { |
2437 | { |
|
|
2438 | int cursorwidth = 1; |
|
|
2439 | int col = oldcursor.col; |
|
|
2440 | |
|
|
2441 | while (col && screen.text[screen.cur.row + TermWin.saveLines][col] == NOCHAR) |
|
|
2442 | col--; |
|
|
2443 | |
|
|
2444 | while (col + cursorwidth < TermWin.ncol |
|
|
2445 | && drawn_text[oldcursor.row][col + cursorwidth] == NOCHAR) |
|
|
2446 | cursorwidth++; |
|
|
2447 | |
2438 | #ifndef NO_CURSORCOLOR |
2448 | #ifndef NO_CURSORCOLOR |
2439 | if (ISSET_PIXCOLOR (Color_cursor)) |
2449 | if (ISSET_PIXCOLOR (Color_cursor)) |
2440 | XSetForeground (display->display, TermWin.gc, pix_colors[Color_cursor]); |
2450 | XSetForeground (display->display, TermWin.gc, pix_colors[Color_cursor]); |
2441 | #endif |
2451 | #endif |
2442 | int cursorwidth = 1; |
|
|
2443 | while (oldcursor.col + cursorwidth < TermWin.ncol |
|
|
2444 | && drawn_text[oldcursor.row][oldcursor.col + cursorwidth] == NOCHAR) |
|
|
2445 | cursorwidth++; |
|
|
2446 | |
2452 | |
2447 | XDrawRectangle (display->display, drawBuffer, TermWin.gc, |
2453 | XDrawRectangle (display->display, drawBuffer, TermWin.gc, |
2448 | Col2Pixel (oldcursor.col), |
2454 | Col2Pixel (col), |
2449 | Row2Pixel (oldcursor.row), |
2455 | Row2Pixel (oldcursor.row), |
2450 | (unsigned int) (Width2Pixel (cursorwidth) - 1), |
2456 | (unsigned int) (Width2Pixel (cursorwidth) - 1), |
2451 | (unsigned int) (Height2Pixel (1) - TermWin.lineSpace - 1)); |
2457 | (unsigned int) (Height2Pixel (1) - TermWin.lineSpace - 1)); |
2452 | } |
2458 | } |
2453 | } |
2459 | } |
… | |
… | |
3796 | while (*s) |
3802 | while (*s) |
3797 | scr_overlay_set (x++, y, *s++); |
3803 | scr_overlay_set (x++, y, *s++); |
3798 | } |
3804 | } |
3799 | |
3805 | |
3800 | void |
3806 | void |
|
|
3807 | rxvt_term::scr_overlay_set (int x, int y, const wchar_t *s) |
|
|
3808 | { |
|
|
3809 | while (*s) |
|
|
3810 | { |
|
|
3811 | text_t t = *s++; |
|
|
3812 | int width = wcwidth (t); |
|
|
3813 | |
|
|
3814 | while (width--) |
|
|
3815 | { |
|
|
3816 | scr_overlay_set (x++, y, t); |
|
|
3817 | t = NOCHAR; |
|
|
3818 | } |
|
|
3819 | } |
|
|
3820 | } |
|
|
3821 | |
|
|
3822 | void |
3801 | rxvt_term::scr_swap_overlay () |
3823 | rxvt_term::scr_swap_overlay () |
3802 | { |
3824 | { |
3803 | if (!ov_text) |
3825 | if (!ov_text) |
3804 | return; |
3826 | return; |
3805 | |
3827 | |