From ac059c2eea817ebe83ecb449e5d78943f9170692 Mon Sep 17 00:00:00 2001 From: simon Date: Fri, 15 Oct 2004 08:51:57 +0000 Subject: [PATCH] Fix cursor display on a combined character cell. git-svn-id: svn://svn.tartarus.org/sgt/putty@4625 cda61777-01e9-0310-a592-d414129be87e --- terminal.c | 4 +++- unix/pterm.c | 3 +++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/terminal.c b/terminal.c index 281d2d22..87f4a894 100644 --- a/terminal.c +++ b/terminal.c @@ -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; } diff --git a/unix/pterm.c b/unix/pterm.c index 7efce806..9f767fd4 100644 --- a/unix/pterm.c +++ b/unix/pterm.c @@ -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 { -- 2.11.0