aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/getchar.h
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2022-03-31 15:47:53 +0800
committerzeertzjq <zeertzjq@outlook.com>2022-04-29 15:51:03 +0800
commitdde4f09f51ffaf8df5cc2a81eed935e31e1f94ba (patch)
tree392ec276e38a6a980d5610060795eea730b73311 /src/nvim/getchar.h
parent188537efb32d02081c1821cb5b48fbcf59230732 (diff)
downloadrneovim-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/getchar.h')
-rw-r--r--src/nvim/getchar.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/nvim/getchar.h b/src/nvim/getchar.h
index 9b8605f1df..237f0632bd 100644
--- a/src/nvim/getchar.h
+++ b/src/nvim/getchar.h
@@ -48,6 +48,10 @@ struct map_arguments {
char_u lhs[MAXMAPLEN + 1];
size_t lhs_len;
+ /// Unsimplifed {lhs} of the mapping. If no simplification has been done then alt_lhs_len is 0.
+ char_u alt_lhs[MAXMAPLEN + 1];
+ size_t alt_lhs_len;
+
char_u *rhs; /// The {rhs} of the mapping.
size_t rhs_len;
LuaRef rhs_lua; /// lua function as rhs
@@ -59,7 +63,7 @@ struct map_arguments {
};
typedef struct map_arguments MapArguments;
#define MAP_ARGUMENTS_INIT { false, false, false, false, false, false, false, \
- { 0 }, 0, NULL, 0, LUA_NOREF, false, NULL, 0, NULL }
+ { 0 }, 0, { 0 }, 0, NULL, 0, LUA_NOREF, false, NULL, 0, NULL }
#define KEYLEN_PART_KEY (-1) // keylen value for incomplete key-code
#define KEYLEN_PART_MAP (-2) // keylen value for incomplete mapping