diff options
author | zeertzjq <zeertzjq@outlook.com> | 2022-01-29 06:37:44 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-29 06:37:44 +0800 |
commit | 1ebac3cf4e0dd814ca90382e404da477dc2b894e (patch) | |
tree | 22ad6247acd7b8dab3a58982cc50c272a8287614 /src/nvim/getchar.c | |
parent | af9a2a201d5e2bc178488a04c114ba6c1db4fa19 (diff) | |
parent | 75f4741db92768db1db937fd4dbce15a01b65042 (diff) | |
download | rneovim-1ebac3cf4e0dd814ca90382e404da477dc2b894e.tar.gz rneovim-1ebac3cf4e0dd814ca90382e404da477dc2b894e.tar.bz2 rneovim-1ebac3cf4e0dd814ca90382e404da477dc2b894e.zip |
Merge pull request #17220 from zeertzjq/unget-alt-chord
Diffstat (limited to 'src/nvim/getchar.c')
-rw-r--r-- | src/nvim/getchar.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/nvim/getchar.c b/src/nvim/getchar.c index 55bcfa0e97..3e0f01852e 100644 --- a/src/nvim/getchar.c +++ b/src/nvim/getchar.c @@ -1598,8 +1598,9 @@ int vgetc(void) if (!no_mapping && KeyTyped && !(State & TERM_FOCUS) && (mod_mask == MOD_MASK_ALT || mod_mask == MOD_MASK_META)) { mod_mask = 0; - ins_char_typebuf(c, 0); - ins_char_typebuf(ESC, 0); + int len = ins_char_typebuf(c, 0); + (void)ins_char_typebuf(ESC, 0); + ungetchars(len + 3); // The ALT/META modifier takes three more bytes continue; } |