aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorRaphael <glephunter@gmail.com>2024-02-04 11:12:31 +0800
committerGitHub <noreply@github.com>2024-02-04 11:12:31 +0800
commit21df0cdb886c09fccafb392949c690ca4af03987 (patch)
treea0bd9537ed1646965255d5a8a6cd98de12ee8221 /test
parentcd3399f6bd99494c5805ee2560e515ec6c782e59 (diff)
downloadrneovim-21df0cdb886c09fccafb392949c690ca4af03987.tar.gz
rneovim-21df0cdb886c09fccafb392949c690ca4af03987.tar.bz2
rneovim-21df0cdb886c09fccafb392949c690ca4af03987.zip
vim-patch:9.1.0075: insert completion not correct when adding new leader (#27332)
Problem: insert completion not correct when adding new leader Solution: Reset compl_curr_match to compl_shown_match (glepnir) closes: vim/vim#13957 https://github.com/vim/vim/commit/cbb46b439888e10f87baaca504eafd191723c44b
Diffstat (limited to 'test')
-rw-r--r--test/old/testdir/test_popup.vim12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/old/testdir/test_popup.vim b/test/old/testdir/test_popup.vim
index fa0df77ab5..ca6a4c0728 100644
--- a/test/old/testdir/test_popup.vim
+++ b/test/old/testdir/test_popup.vim
@@ -1162,9 +1162,21 @@ func Test_CompleteChanged()
call feedkeys("a\<C-N>\<C-N>\<C-N>\<C-N>\<C-P>", 'tx')
call assert_equal('foobar', g:word)
+ func Omni_test(findstart, base)
+ if a:findstart
+ return col(".")
+ endif
+ return [#{word: "one"}, #{word: "two"}, #{word: "five"}]
+ endfunc
+ set omnifunc=Omni_test
+ set completeopt=menu,menuone
+ call feedkeys("i\<C-X>\<C-O>\<BS>\<BS>\<BS>f", 'tx')
+ call assert_equal('five', g:word)
+
autocmd! AAAAA_Group
set complete& completeopt&
delfunc! OnPumChange
+ delfunc! Omni_test
bw!
endfunc