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. --- test/functional/ui/input_spec.lua | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'test/functional/ui/input_spec.lua') diff --git a/test/functional/ui/input_spec.lua b/test/functional/ui/input_spec.lua index 799aad8d55..43b6c19b44 100644 --- a/test/functional/ui/input_spec.lua +++ b/test/functional/ui/input_spec.lua @@ -249,6 +249,14 @@ it('typing a simplifiable key at hit-enter prompt triggers mapping vim-patch:8.2 ]]) end) +it('mixing simplified and unsimplified keys can trigger mapping vim-patch:8.2.0916', function() + command('set timeoutlen=10') + command([[imap ' ]]) + command('imap c-a') + feed([[a']]) + expect('c-a') +end) + describe('input non-printable chars', function() after_each(function() os.remove('Xtest-overwrite') -- cgit