diff options
author | Bram Moolenaar <Bram@vim.org> | 2019-10-13 16:43:39 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2019-10-13 16:43:39 +0200 |
commit | 459fd785e4a8d044147a3f83a5fca8748528aa84 (patch) | |
tree | 52c679e08a445bac0f650bff4d8118d6eb190d7b /src/getchar.c | |
parent | 171a921b51101c1261040d28a8147c8829b675d3 (diff) | |
download | vim-git-459fd785e4a8d044147a3f83a5fca8748528aa84.tar.gz |
patch 8.1.2145: cannot map <C-H> when modifyOtherKeys is enabledv8.1.2145
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.
Diffstat (limited to 'src/getchar.c')
-rw-r--r-- | src/getchar.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/getchar.c b/src/getchar.c index 0e4e3c315..475bfca8e 100644 --- a/src/getchar.c +++ b/src/getchar.c @@ -52,7 +52,7 @@ static int typeahead_char = 0; /* typeahead char that's not flushed */ */ static int block_redo = FALSE; -static int KeyNoremap = 0; /* remapping flags */ +static int KeyNoremap = 0; // remapping flags /* * Variables used by vgetorpeek() and flush_buffers(). @@ -1771,7 +1771,7 @@ vgetc(void) if (!no_reduce_keys) { // A modifier was not used for a mapping, apply it to ASCII - // keys. + // keys. Shift would already have been applied. if ((mod_mask & MOD_MASK_CTRL) && ((c >= '`' && c <= 0x7f) || (c >= '@' && c <= '_'))) @@ -2240,6 +2240,7 @@ handle_mapping( // Skip ":lmap" mappings if keys were mapped. if (mp->m_keys[0] == tb_c1 && (mp->m_mode & local_State) + && !(mp->m_simplified && seenModifyOtherKeys) && ((mp->m_mode & LANGMAP) == 0 || typebuf.tb_maplen == 0)) { #ifdef FEAT_LANGMAP |