diff options
author | James McCoy <jamessan@jamessan.com> | 2016-10-12 16:32:53 -0400 |
---|---|---|
committer | James McCoy <jamessan@jamessan.com> | 2016-10-12 16:32:53 -0400 |
commit | 68f7464eed245a5cc164a81c4d962ed628cfa9e5 (patch) | |
tree | ab092ba42f4f73d37e863e02e217e7e77c4a1393 | |
parent | 6bc3bcefc6ca907d18bd5c8d3667901a62e1285c (diff) | |
download | rneovim-68f7464eed245a5cc164a81c4d962ed628cfa9e5.tar.gz rneovim-68f7464eed245a5cc164a81c4d962ed628cfa9e5.tar.bz2 rneovim-68f7464eed245a5cc164a81c4d962ed628cfa9e5.zip |
ui: Blank the next cell for any multi-cell character
Followup for #5461
-rw-r--r-- | src/nvim/ui.c | 7 |
1 files changed, 4 insertions, 3 deletions
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(); } |