]> asedeno.scripts.mit.edu Git - PuTTY.git/commitdiff
Fix cursor display on a combined character cell.
authorSimon Tatham <anakin@pobox.com>
Fri, 15 Oct 2004 08:51:57 +0000 (08:51 +0000)
committerSimon Tatham <anakin@pobox.com>
Fri, 15 Oct 2004 08:51:57 +0000 (08:51 +0000)
[originally from svn r4625]

terminal.c
unix/pterm.c

index 281d2d22338f352ef8d52ff12ee1438cb90e0a86..87f4a89492c3083f74b6ee608344741f7ac2539f 100644 (file)
@@ -2717,6 +2717,7 @@ void term_out(Terminal *term)
                        break;
                      case 0:
                        add_cc(cline, term->curs.x - !term->wrapnext, c);
+                       term->seen_disp_event = 1;
                        continue;
                      default:
                        continue;
@@ -4559,6 +4560,7 @@ static void do_paint(Terminal *term, Context ctx, int may_optimise)
        if (i == our_curs_y && (term->curstype != cursor || updated_line)) {
            ch[0] = (wchar_t) cursor_background.chr;
            attr = cursor_background.attr | cursor;
+           ccount = 1;
 
            if (cursor_background.cc_next) {
                termchar *dd = ldata->chars + cursor_background.cc_next;
@@ -4594,7 +4596,7 @@ static void do_paint(Terminal *term, Context ctx, int may_optimise)
                attr |= TATTR_COMBINING;
            }
 
-           do_cursor(ctx, our_curs_x, i, ch, 1, attr, ldata->lattr);
+           do_cursor(ctx, our_curs_x, i, ch, ccount, attr, ldata->lattr);
            term->curstype = cursor;
        }
 
index 7efce806f9dbf83128ed9164ecaa5ab0951f893d..9f767fd4ba88257189c524ff494ad2ac35174b6f 100644 (file)
@@ -2049,6 +2049,9 @@ void do_cursor(Context ctx, int x, int y, wchar_t *text, int len,
         active = 0;
     do_text_internal(ctx, x, y, text, len, attr, lattr);
 
+    if (attr & TATTR_COMBINING)
+       len = 1;
+
     if (attr & ATTR_WIDE) {
        widefactor = 2;
     } else {