From aced8c2f4fd1cf3f8ac7cdb0dd54d19ef4390ef8 Mon Sep 17 00:00:00 2001 From: glepnir Date: Sat, 15 Jun 2024 15:13:05 +0200 Subject: patch 9.1.0489: default completion may break with fuzzy Problem: default completion may break with fuzzy Solution: check that completion_match_array is not null (glepnir) closes: #15010 Signed-off-by: glepnir Signed-off-by: Christian Brabandt --- src/testdir/test_ins_complete.vim | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/testdir/test_ins_complete.vim') diff --git a/src/testdir/test_ins_complete.vim b/src/testdir/test_ins_complete.vim index 9f689fefe2..51e3c1b5b6 100644 --- a/src/testdir/test_ins_complete.vim +++ b/src/testdir/test_ins_complete.vim @@ -2573,6 +2573,16 @@ func Test_complete_fuzzy_match() call feedkeys("S\\fb\", 'tx') call assert_equal('fooBaz', g:word) + " avoid break default completion behavior + set completeopt=fuzzy,menu + call setline(1, ['hello help hero h']) + exe "norm! A\\" + call assert_equal('hello help hero hello', getline('.')) + set completeopt+=noinsert + call setline(1, ['hello help hero h']) + exe "norm! A\\" + call assert_equal('hello help hero h', getline('.')) + " clean up set omnifunc= bw! -- cgit v1.2.3