From 9757b11aaf58cf49b96daa3abe31af2212badbe1 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Fri, 30 Aug 2024 16:34:01 +0800 Subject: vim-patch:9.1.0631: wrong completion list displayed with non-existing dir + fuzzy completion Problem: wrong completion list displayed with non-existing dir + fuzzy completion (kawarimidoll) Solution: clear list of matches, if leader did not use fuzzy match (glepnir) fixes: vim/vim#15357 closes: vim/vim#15365 https://github.com/vim/vim/commit/6b6280c4a270547f84f01c0e0d9be1b7d6bb9e20 Co-authored-by: glepnir --- test/functional/ui/popupmenu_spec.lua | 7 +++++++ test/old/testdir/test_popup.vim | 5 +++++ 2 files changed, 12 insertions(+) (limited to 'test') diff --git a/test/functional/ui/popupmenu_spec.lua b/test/functional/ui/popupmenu_spec.lua index e41df13088..6eb487d142 100644 --- a/test/functional/ui/popupmenu_spec.lua +++ b/test/functional/ui/popupmenu_spec.lua @@ -6955,6 +6955,13 @@ describe('builtin popupmenu', function() {2:-- }{5:match 2 of 3} | ]]) + feed('S/non_exit_folder') + screen:expect([[ + /non_exit_folder^ | + {1:~ }|*18 + {2:-- }{6:Pattern not found} | + ]]) + feed('') end) diff --git a/test/old/testdir/test_popup.vim b/test/old/testdir/test_popup.vim index 988d60916c..240529735f 100644 --- a/test/old/testdir/test_popup.vim +++ b/test/old/testdir/test_popup.vim @@ -1513,6 +1513,11 @@ func Test_pum_highlights_match() call TermWait(buf, 50) call VerifyScreenDump(buf, 'Test_pum_highlights_11', {}) + " issue #15357 + call term_sendkeys(buf, "\S/non_exit_folder\\") + call TermWait(buf, 50) + call VerifyScreenDump(buf, 'Test_pum_highlights_15', {}) + call term_sendkeys(buf, "\\") call TermWait(buf) -- cgit