diff options
| author | bfredl <bjorn.linse@gmail.com> | 2024-08-30 12:58:48 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-08-30 12:58:48 +0200 |
| commit | 5f95f1249f464e4f0ceed468ec5a1ba6e810da14 (patch) | |
| tree | 6113193fda7a7c0f94577a464e39964e74311583 /src/nvim/normal.c | |
| parent | 4353996d0fa8e5872a334d68196d8088391960cf (diff) | |
| parent | cfdf68a7acde16597fbd896674af68c42361102c (diff) | |
| download | rneovim-5f95f1249f464e4f0ceed468ec5a1ba6e810da14.tar.gz rneovim-5f95f1249f464e4f0ceed468ec5a1ba6e810da14.tar.bz2 rneovim-5f95f1249f464e4f0ceed468ec5a1ba6e810da14.zip | |
Merge pull request #30014 from bfredl/neoemoji
support emojis with ZWJ and variant selectors
Diffstat (limited to 'src/nvim/normal.c')
| -rw-r--r-- | src/nvim/normal.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/nvim/normal.c b/src/nvim/normal.c index f44a64af21..f3bdea9a85 100644 --- a/src/nvim/normal.c +++ b/src/nvim/normal.c @@ -837,7 +837,10 @@ static void normal_get_additional_char(NormalState *s) while ((s->c = vpeekc()) > 0 && (s->c >= 0x100 || MB_BYTE2LEN(vpeekc()) > 1)) { s->c = plain_vgetc(); - if (!utf_iscomposing(s->c)) { + // TODO(bfredl): only allowing up to two composing chars is cringe af. + // Could reuse/abuse schar_T to at least allow us to input anything we are able + // to display and use the stateful utf8proc algorithm like utf_composinglike + if (!utf_iscomposing_legacy(s->c)) { vungetc(s->c); // it wasn't, put it back break; } else if (s->ca.ncharC1 == 0) { |