diff options
author | zeertzjq <zeertzjq@outlook.com> | 2022-03-31 15:47:53 +0800 |
---|---|---|
committer | zeertzjq <zeertzjq@outlook.com> | 2022-04-29 15:51:03 +0800 |
commit | dde4f09f51ffaf8df5cc2a81eed935e31e1f94ba (patch) | |
tree | 392ec276e38a6a980d5610060795eea730b73311 /src/nvim/ex_docmd.c | |
parent | 188537efb32d02081c1821cb5b48fbcf59230732 (diff) | |
download | rneovim-dde4f09f51ffaf8df5cc2a81eed935e31e1f94ba.tar.gz rneovim-dde4f09f51ffaf8df5cc2a81eed935e31e1f94ba.tar.bz2 rneovim-dde4f09f51ffaf8df5cc2a81eed935e31e1f94ba.zip |
vim-patch:8.1.2145: cannot map <C-H> when modifyOtherKeys is enabled
Problem: Cannot map <C-H> when modifyOtherKeys is enabled.
Solution: Add the <C-H> mapping twice, both with modifier and as 0x08. Use
only the first one when modifyOtherKeys has been detected.
https://github.com/vim/vim/commit/459fd785e4a8d044147a3f83a5fca8748528aa84
Add REPTERM_NO_SPECIAL instead of REPTERM_SPECIAL because the meaning of
"special" is different between Vim and Nvim.
Omit seenModifyOtherKeys as Nvim supports attaching multiple UIs.
Omit tests as they send terminal codes.
Keep the behavior of API functions.
Diffstat (limited to 'src/nvim/ex_docmd.c')
-rw-r--r-- | src/nvim/ex_docmd.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/nvim/ex_docmd.c b/src/nvim/ex_docmd.c index 4562f6c751..f3b11cc103 100644 --- a/src/nvim/ex_docmd.c +++ b/src/nvim/ex_docmd.c @@ -5180,8 +5180,7 @@ int uc_add_command(char_u *name, size_t name_len, char_u *rep, uint32_t argt, lo char_u *rep_buf = NULL; garray_T *gap; - replace_termcodes(rep, STRLEN(rep), &rep_buf, false, false, true, - CPO_TO_CPO_FLAGS); + replace_termcodes(rep, STRLEN(rep), &rep_buf, 0, NULL, CPO_TO_CPO_FLAGS); if (rep_buf == NULL) { // Can't replace termcodes - try using the string as is rep_buf = vim_strsave(rep); |