aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/ui.c
diff options
context:
space:
mode:
authorJames McCoy <jamessan@jamessan.com>2016-09-22 00:58:46 -0400
committerJames McCoy <jamessan@jamessan.com>2016-09-24 15:02:51 -0400
commit9e1c659666b5909b0ebb77406db42bc6892659d6 (patch)
tree8f1e78b892b0ca8e799879e597ecf4e377150e59 /src/nvim/ui.c
parent9419a4c86c9bbcd40f2146a97ad7ceac8ec8b847 (diff)
downloadrneovim-9e1c659666b5909b0ebb77406db42bc6892659d6.tar.gz
rneovim-9e1c659666b5909b0ebb77406db42bc6892659d6.tar.bz2
rneovim-9e1c659666b5909b0ebb77406db42bc6892659d6.zip
vim-patch:7.4.1697
Problem: Display problems when the 'ambiwidth' and 'emoji' options are not set properly or the terminal doesn't behave as expected. Solution: After drawing an ambiguous width character always position the cursor. https://github.com/vim/vim/commit/cb0700844c1274fe8bc0ceaffaee0ad21c406f30
Diffstat (limited to 'src/nvim/ui.c')
-rw-r--r--src/nvim/ui.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/nvim/ui.c b/src/nvim/ui.c
index b8d44cbcf8..648d633e07 100644
--- a/src/nvim/ui.c
+++ b/src/nvim/ui.c
@@ -397,7 +397,10 @@ static void send_output(uint8_t **ptr)
size_t clen = (size_t)mb_ptr2len(p);
UI_CALL(put, p, (size_t)clen);
col++;
- if (mb_ptr2cells(p) > 1) {
+ if (utf_ambiguous_width(*p)) {
+ pending_cursor_update = true;
+ flush_cursor_update();
+ } else if (mb_ptr2cells(p) > 1) {
// double cell character, blank the next cell
UI_CALL(put, NULL, 0);
col++;