From 32da3e56cd12210cd567609f2ec7dd4f0c1ee4c6 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Tue, 26 Apr 2022 23:13:26 +0800 Subject: vim-patch:8.2.0916: mapping with partly modifyOtherKeys code does not work Problem: Mapping with partly modifyOtherKeys code does not work. Solution: If there is no mapping with a separate modifier include the modifier in the key and then try mapping again. (closes vim/vim#6200) https://github.com/vim/vim/commit/975a880a1389e8ce6dea8d66a7c109140b2f94ec Cherry-pick applicable part of put_string_in_typebuf(). Revert related changes from 10a5825. Use KEYLEN_PART_KEY for incomplete modifier sequence. Omit test as it sends terminal codes. Use a Lua test instead. --- src/nvim/edit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/nvim/edit.c') diff --git a/src/nvim/edit.c b/src/nvim/edit.c index b8f88895a4..076cf445cf 100644 --- a/src/nvim/edit.c +++ b/src/nvim/edit.c @@ -5640,7 +5640,7 @@ int get_literal(bool no_simplify) for (;;) { nc = plain_vgetc(); if (!no_simplify) { - nc = merge_modifiers(nc); + nc = merge_modifiers(nc, &mod_mask); } if ((mod_mask & ~MOD_MASK_SHIFT) != 0) { // A character with non-Shift modifiers should not be a valid -- cgit