diff options
author | James McCoy <jamessan@jamessan.com> | 2016-09-21 10:15:19 -0400 |
---|---|---|
committer | James McCoy <jamessan@jamessan.com> | 2016-09-24 14:03:14 -0400 |
commit | d533edf61eef15456efdf16bf45e68c824ee5870 (patch) | |
tree | 0fbbf17c1bc09ae02d543edee2b1e6a7528421ab /src/nvim/mbyte.c | |
parent | 68bcb32ec43e2fab30dc05439fc77cf28793922c (diff) | |
download | rneovim-d533edf61eef15456efdf16bf45e68c824ee5870.tar.gz rneovim-d533edf61eef15456efdf16bf45e68c824ee5870.tar.bz2 rneovim-d533edf61eef15456efdf16bf45e68c824ee5870.zip |
vim-patch:7.4.1604
Problem: Although emoji characters are ambiguous width, best is to treat
them as full width.
Solution: Update the Unicode character tables. Add the 'emoji' options.
(Yasuhiro Matsumoto)
https://github.com/vim/vim/commit/3848e00e0177abdb31bc600234967863ec487233
Diffstat (limited to 'src/nvim/mbyte.c')
-rw-r--r-- | src/nvim/mbyte.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/nvim/mbyte.c b/src/nvim/mbyte.c index f577fd847e..e05b3f3a37 100644 --- a/src/nvim/mbyte.c +++ b/src/nvim/mbyte.c @@ -949,6 +949,9 @@ int utf_char2cells(int c) if (intable(doublewidth, ARRAY_SIZE(doublewidth), c)) return 2; #endif + if (p_emoji && intable(emoji, ARRAY_SIZE(emoji), c)) { + return 2; + } } /* Characters below 0x100 are influenced by 'isprint' option */ else if (c >= 0x80 && !vim_isprintc(c)) |