From 68f7464eed245a5cc164a81c4d962ed628cfa9e5 Mon Sep 17 00:00:00 2001 From: James McCoy Date: Wed, 12 Oct 2016 16:32:53 -0400 Subject: ui: Blank the next cell for any multi-cell character Followup for #5461 --- src/nvim/ui.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/nvim/ui.c') diff --git a/src/nvim/ui.c b/src/nvim/ui.c index cf5e95f88a..eb500414a7 100644 --- a/src/nvim/ui.c +++ b/src/nvim/ui.c @@ -397,13 +397,14 @@ static void send_output(uint8_t **ptr) size_t clen = (size_t)mb_ptr2len(p); UI_CALL(put, p, (size_t)clen); col++; - if (utf_ambiguous_width(utf_ptr2char(p))) { - pending_cursor_update = true; - } else if (mb_ptr2cells(p) > 1) { + if (mb_ptr2cells(p) > 1) { // double cell character, blank the next cell UI_CALL(put, NULL, 0); col++; } + if (utf_ambiguous_width(utf_ptr2char(p))) { + pending_cursor_update = true; + } if (col >= width) { ui_linefeed(); } -- cgit