From 0b12f6d7bef60f644bf55d0158a11a58a21c3e71 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Sat, 30 Apr 2022 22:12:00 +0800 Subject: vim-patch:8.2.4848: local completion with mappings and simplification not working Problem: Local completion with mappings and simplification not working. Solution: Fix local completion / mappings not ignored if keys are not simplified. (closes vim/vim#10323) https://github.com/vim/vim/commit/ee4460306917431d0d17a7cb11c6646f4c6540b6 --- src/nvim/testdir/test_popup.vim | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'src/nvim/testdir') diff --git a/src/nvim/testdir/test_popup.vim b/src/nvim/testdir/test_popup.vim index eb367cfe5c..9a31f61582 100644 --- a/src/nvim/testdir/test_popup.vim +++ b/src/nvim/testdir/test_popup.vim @@ -325,6 +325,21 @@ func Test_compl_vim_cmds_after_register_expr() bwipe! endfunc +func Test_compl_ignore_mappings() + call setline(1, ['foo', 'bar', 'baz', 'foobar']) + inoremap (C-P) + inoremap (C-N) + normal! G + call feedkeys("o\\\\\\\", 'tx') + call assert_equal('baz', getline('.')) + " Also test with unsimplified keys + call feedkeys("o\\<*C-N>\<*C-N>\<*C-N>\<*C-P>\<*C-N>\", 'tx') + call assert_equal('baz', getline('.')) + iunmap + iunmap + bwipe! +endfunc + func DummyCompleteOne(findstart, base) if a:findstart return 0 -- cgit