aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorglepnir <glephunter@gmail.com>2025-04-03 14:09:49 +0800
committerglepnir <glephunter@gmail.com>2025-04-03 14:21:37 +0800
commit8cf413e450bfbe1a9887f2bbf869bf9462403a77 (patch)
treead8d1a7d6e7448e78b78f1d09e5f80270e2f645a /test
parent18caa5fb239542107f27c054e54e0bf3a33a2278 (diff)
downloadrneovim-8cf413e450bfbe1a9887f2bbf869bf9462403a77.tar.gz
rneovim-8cf413e450bfbe1a9887f2bbf869bf9462403a77.tar.bz2
rneovim-8cf413e450bfbe1a9887f2bbf869bf9462403a77.zip
vim-patch:9.1.1269: completion: compl_shown_match is updated when starting keyword completion
Problem: compl_shown_match is updated when starting keyword completion and does not include fuzzy matching. Solution: Do not update compl_shown_match when starting keyword completion, since it is the one already selected by the keyword completion direction. (glepnir) closes: vim/vim#17033 https://github.com/vim/vim/commit/e4e4d1c381e9d0af55f6111e9bcaf98ad60461fc Co-authored-by: glepnir <glephunter@gmail.com>
Diffstat (limited to 'test')
-rw-r--r--test/old/testdir/test_ins_complete.vim6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/old/testdir/test_ins_complete.vim b/test/old/testdir/test_ins_complete.vim
index 0e4f051f5a..187d0acc00 100644
--- a/test/old/testdir/test_ins_complete.vim
+++ b/test/old/testdir/test_ins_complete.vim
@@ -2861,6 +2861,12 @@ func Test_complete_opt_fuzzy()
call feedkeys("i\<C-R>=CompAnother()\<CR>\<C-P>\<C-P>", 'tx')
call assert_equal("for", g:abbr)
+ set cot=menu,fuzzy
+ call feedkeys("Sblue\<CR>bar\<CR>b\<C-X>\<C-P>\<C-Y>\<ESC>", 'tx')
+ call assert_equal('bar', getline('.'))
+ call feedkeys("Sb\<C-X>\<C-N>\<C-Y>\<ESC>", 'tx')
+ call assert_equal('blue', getline('.'))
+
" clean up
set omnifunc=
bw!