summaryrefslogtreecommitdiffstats
path: root/src/testdir
diff options
context:
space:
mode:
authorglepnir <glephunter@gmail.com>2024-02-03 18:11:13 +0100
committerChristian Brabandt <cb@256bit.org>2024-02-03 18:11:13 +0100
commitcbb46b439888e10f87baaca504eafd191723c44b (patch)
treeff27837487090ca7e16db87742fffc6ee78972de /src/testdir
parenteac3fdcfa0b54281c37ffb66b4d4e8d1072cca1c (diff)
patch 9.1.0075: insert completion not correct when adding new leaderv9.1.0075
Problem: insert completion not correct when adding new leader Solution: Reset compl_curr_match to compl_shown_match (glepnir) closes: #13957 Co-authored-by: glepnir <glephunter@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
Diffstat (limited to 'src/testdir')
-rw-r--r--src/testdir/test_popup.vim12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/testdir/test_popup.vim b/src/testdir/test_popup.vim
index a0a1f745a7..879d1fa3e5 100644
--- a/src/testdir/test_popup.vim
+++ b/src/testdir/test_popup.vim
@@ -1159,9 +1159,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