ui: Blank the next cell for any multi-cell character

Followup for #5461
This commit is contained in:
James McCoy
2016-10-12 16:32:53 -04:00
parent 6bc3bcefc6
commit 68f7464eed

View File

@@ -397,13 +397,14 @@ static void send_output(uint8_t **ptr)
size_t clen = (size_t)mb_ptr2len(p); size_t clen = (size_t)mb_ptr2len(p);
UI_CALL(put, p, (size_t)clen); UI_CALL(put, p, (size_t)clen);
col++; col++;
if (utf_ambiguous_width(utf_ptr2char(p))) { if (mb_ptr2cells(p) > 1) {
pending_cursor_update = true;
} else if (mb_ptr2cells(p) > 1) {
// double cell character, blank the next cell // double cell character, blank the next cell
UI_CALL(put, NULL, 0); UI_CALL(put, NULL, 0);
col++; col++;
} }
if (utf_ambiguous_width(utf_ptr2char(p))) {
pending_cursor_update = true;
}
if (col >= width) { if (col >= width) {
ui_linefeed(); ui_linefeed();
} }