diff options
author | zeertzjq <zeertzjq@outlook.com> | 2022-04-30 15:02:22 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2022-04-30 15:02:22 +0100 |
commit | ee4460306917431d0d17a7cb11c6646f4c6540b6 (patch) | |
tree | c3b4843db0824dc67ea9922b85c2b7f07cbf512d /src/testdir/test_popup.vim | |
parent | a5d3590505fc3e1deea990560d472baa563abed7 (diff) |
patch 8.2.4848: local completion with mappings and simplification not workingv8.2.4848
Problem: Local completion with mappings and simplification not working.
Solution: Fix local completion <C-N>/<C-P> mappings not ignored if keys are
not simplified. (closes #10323)
Diffstat (limited to 'src/testdir/test_popup.vim')
-rw-r--r-- | src/testdir/test_popup.vim | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/testdir/test_popup.vim b/src/testdir/test_popup.vim index 5d04583717..9832ccf606 100644 --- a/src/testdir/test_popup.vim +++ b/src/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> (C-P) + inoremap <C-N> (C-N) + normal! G + call feedkeys("o\<C-X>\<C-N>\<C-N>\<C-N>\<C-P>\<C-N>\<C-Y>", 'tx') + call assert_equal('baz', getline('.')) + " Also test with unsimplified keys + call feedkeys("o\<C-X>\<*C-N>\<*C-N>\<*C-N>\<*C-P>\<*C-N>\<C-Y>", 'tx') + call assert_equal('baz', getline('.')) + iunmap <C-P> + iunmap <C-N> + bwipe! +endfunc + func DummyCompleteOne(findstart, base) if a:findstart return 0 |