aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/functional/ui/popupmenu_spec.lua22
-rw-r--r--test/old/testdir/test_popup.vim11
2 files changed, 33 insertions, 0 deletions
diff --git a/test/functional/ui/popupmenu_spec.lua b/test/functional/ui/popupmenu_spec.lua
index a1a21eb317..db2ee7ff29 100644
--- a/test/functional/ui/popupmenu_spec.lua
+++ b/test/functional/ui/popupmenu_spec.lua
@@ -4905,6 +4905,28 @@ describe('builtin popupmenu', function()
feed('o<BS><C-R>=Comp()<CR>')
screen:expect_unchanged(true)
+ feed('<Esc>')
+ command('set completeopt+=fuzzy,menu')
+ feed('S hello helio hero h<C-X><C-P>')
+ screen:expect([[
+ hello helio hero h^ |
+ {1:~ }{n: }{mn:h}{n:ello }{1: }|
+ {1:~ }{n: }{mn:h}{n:elio }{1: }|
+ {1:~ }{s: }{ms:h}{s:ero }{1: }|
+ {1:~ }|*15
+ {2:-- }{5:match 1 of 3} |
+ ]])
+
+ feed('<Esc>S hello helio hero h<C-X><C-P><C-P>')
+ screen:expect([[
+ hello helio hero h^ |
+ {1:~ }{n: }{mn:h}{n:ello }{1: }|
+ {1:~ }{s: }{ms:h}{s:elio }{1: }|
+ {1:~ }{n: }{mn:h}{n:ero }{1: }|
+ {1:~ }|*15
+ {2:-- }{5:match 2 of 3} |
+ ]])
+
feed('<C-E><Esc>')
end)
end
diff --git a/test/old/testdir/test_popup.vim b/test/old/testdir/test_popup.vim
index bfd81ad0a9..4960041452 100644
--- a/test/old/testdir/test_popup.vim
+++ b/test/old/testdir/test_popup.vim
@@ -1489,6 +1489,17 @@ func Test_pum_highlights_match()
call term_sendkeys(buf, "o\<BS>\<C-R>=Comp()\<CR>")
call VerifyScreenDump(buf, 'Test_pum_highlights_09', {})
+ " issue #15095 wrong select
+ call term_sendkeys(buf, "\<ESC>:set completeopt=fuzzy,menu\<CR>")
+ call TermWait(buf)
+ call term_sendkeys(buf, "S hello helio hero h\<C-X>\<C-P>")
+ call TermWait(buf, 50)
+ call VerifyScreenDump(buf, 'Test_pum_highlights_10', {})
+
+ call term_sendkeys(buf, "\<ESC>S hello helio hero h\<C-X>\<C-P>\<C-P>")
+ call TermWait(buf, 50)
+ call VerifyScreenDump(buf, 'Test_pum_highlights_11', {})
+
call term_sendkeys(buf, "\<C-E>\<Esc>")
call TermWait(buf)