aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2024-06-16 07:07:06 +0800
committerGitHub <noreply@github.com>2024-06-16 07:07:06 +0800
commitaa319da4024a77b0f7c40e08c6f5d5b512a7f899 (patch)
tree3c7fb8ed8b9e209b4df5807956a4a5667699eca2 /test
parent7e65f3757bdbe41bbf022b05b6869ad6e7febe0d (diff)
downloadrneovim-aa319da4024a77b0f7c40e08c6f5d5b512a7f899.tar.gz
rneovim-aa319da4024a77b0f7c40e08c6f5d5b512a7f899.tar.bz2
rneovim-aa319da4024a77b0f7c40e08c6f5d5b512a7f899.zip
vim-patch:9.1.0489: default completion may break with fuzzy (#29364)
Problem: default completion may break with fuzzy Solution: check that completion_match_array is not null (glepnir) closes: vim/vim#15010 https://github.com/vim/vim/commit/aced8c2f4fd1cf3f8ac7cdb0dd54d19ef4390ef8 Co-authored-by: glepnir <glephunter@gmail.com>
Diffstat (limited to 'test')
-rw-r--r--test/old/testdir/test_ins_complete.vim10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/old/testdir/test_ins_complete.vim b/test/old/testdir/test_ins_complete.vim
index f8fed8d16c..96e37bd673 100644
--- a/test/old/testdir/test_ins_complete.vim
+++ b/test/old/testdir/test_ins_complete.vim
@@ -2634,6 +2634,16 @@ func Test_complete_fuzzy_match()
call feedkeys("S\<C-x>\<C-o>fb\<C-n>", '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\<C-X>\<C-N>"
+ call assert_equal('hello help hero hello', getline('.'))
+ set completeopt+=noinsert
+ call setline(1, ['hello help hero h'])
+ exe "norm! A\<C-X>\<C-N>"
+ call assert_equal('hello help hero h', getline('.'))
+
" clean up
set omnifunc=
bw!