From 8cf413e450bfbe1a9887f2bbf869bf9462403a77 Mon Sep 17 00:00:00 2001 From: glepnir Date: Thu, 3 Apr 2025 14:09:49 +0800 Subject: 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 --- test/old/testdir/test_ins_complete.vim | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'test') 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\=CompAnother()\\\", 'tx') call assert_equal("for", g:abbr) + set cot=menu,fuzzy + call feedkeys("Sblue\bar\b\\\\", 'tx') + call assert_equal('bar', getline('.')) + call feedkeys("Sb\\\\", 'tx') + call assert_equal('blue', getline('.')) + " clean up set omnifunc= bw! -- cgit