From ab1f96e1d5ba6d6664eb472c2eaade4f91982734 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Tue, 7 Jun 2022 00:19:57 +0800 Subject: vim-patch:8.2.5064: no test for what 8.1.0052 fixes (#18881) Problem: No test for what 8.1.0052 fixes. Solution: Add a test. (closes vim/vim#10531) https://github.com/vim/vim/commit/3760bfddc414e4d3e1c4203db8c22e293cf08d09 --- test/functional/legacy/mapping_spec.lua | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'test/functional') diff --git a/test/functional/legacy/mapping_spec.lua b/test/functional/legacy/mapping_spec.lua index 552c26e7f2..456acc12b5 100644 --- a/test/functional/legacy/mapping_spec.lua +++ b/test/functional/legacy/mapping_spec.lua @@ -162,4 +162,21 @@ describe('mapping', function() sleep(10) eq('n', eval('mode()')) end) + + it('timeout works after an mapping is triggered on timeout vim-patch:8.1.0052', function() + command('set timeout timeoutlen=400') + command('inoremap ab TEST') + command('inoremap a ') + -- Enter Insert mode + feed('i') + -- Wait for the "a" mapping to time out + feed('a') + sleep(500) + -- Send "a" and wait for a period shorter than 'timeoutlen' + feed('a') + sleep(100) + -- Send "b", should trigger the "ab" mapping + feed('b') + expect('TEST') + end) end) -- cgit