diff options
| author | James McCoy <jamessan@jamessan.com> | 2016-09-22 00:40:45 -0400 | 
|---|---|---|
| committer | James McCoy <jamessan@jamessan.com> | 2016-09-24 14:03:22 -0400 | 
| commit | 45598d2e5e2b56e24e4d5abe4f28f259e3def572 (patch) | |
| tree | 809db52bae466f1e283f8a8c8a6024596c5ea67b /src | |
| parent | 49735d6fae3d99a05ff63625bb0baf10deae9c71 (diff) | |
| download | rneovim-45598d2e5e2b56e24e4d5abe4f28f259e3def572.tar.gz rneovim-45598d2e5e2b56e24e4d5abe4f28f259e3def572.tar.bz2 rneovim-45598d2e5e2b56e24e4d5abe4f28f259e3def572.zip | |
vim-patch:7.4.1620
Problem:    Emoji characters are not considered as a kind of word character.
Solution:   Give emoji characters a word class number. (Yashuhiro Matsumoto)
https://github.com/vim/vim/commit/4077b33a8370afb3d5ae74e556a0119cf51fe294
Diffstat (limited to 'src')
| -rw-r--r-- | src/nvim/mbyte.c | 7 | ||||
| -rw-r--r-- | src/nvim/version.c | 2 | 
2 files changed, 7 insertions, 2 deletions
| diff --git a/src/nvim/mbyte.c b/src/nvim/mbyte.c index e05b3f3a37..e4ed46208b 100644 --- a/src/nvim/mbyte.c +++ b/src/nvim/mbyte.c @@ -949,7 +949,7 @@ int utf_char2cells(int c)      if (intable(doublewidth, ARRAY_SIZE(doublewidth), c))        return 2;  #endif -    if (p_emoji && intable(emoji, ARRAY_SIZE(emoji), c)) { +    if (p_emoji && intable(emoji_tab, ARRAY_SIZE(emoji_tab), c)) {        return 2;      }    } @@ -1715,6 +1715,11 @@ int utf_class(int c)        return (int)classes[mid].class;    } +  // emoji +  if (intable(emoji_tab, ARRAY_SIZE(emoji_tab), c)) { +    return 3; +  } +    /* most other characters are "word" characters */    return 2;  } diff --git a/src/nvim/version.c b/src/nvim/version.c index 0106185d13..43aaa6b1ed 100644 --- a/src/nvim/version.c +++ b/src/nvim/version.c @@ -823,7 +823,7 @@ static int included_patches[] = {    // 1623 NA    // 1622 NA    // 1621 NA -  // 1620, +  1620,    // 1619,    // 1618 NA    // 1617 NA | 
