aboutsummaryrefslogtreecommitdiff
path: root/test/functional/ui/popupmenu_spec.lua
diff options
context:
space:
mode:
authorglepnir <glephunter@gmail.com>2025-01-11 07:58:45 +0800
committerGitHub <noreply@github.com>2025-01-10 23:58:45 +0000
commitfbe546e25d21f3184814d696c329d23d146bd615 (patch)
treee8e9b1a4cd34a8e2bb64f5f61de2c91e4c3c96ef /test/functional/ui/popupmenu_spec.lua
parentdcaf9a60e9c0b3b4f8439897b344b4e632802beb (diff)
downloadrneovim-fbe546e25d21f3184814d696c329d23d146bd615.tar.gz
rneovim-fbe546e25d21f3184814d696c329d23d146bd615.tar.bz2
rneovim-fbe546e25d21f3184814d696c329d23d146bd615.zip
vim-patch:9.1.0996: ComplMatchIns may highlight wrong text (#31931)
Problem: ComplMatchIns may highlight wrong text Solution: don't highlight in case of fuzzy match, skip-highlight when not inserting anything (glepnir) closes: vim/vim#16404 https://github.com/vim/vim/commit/e890887b8052561ac5f8dce218e578ed28599cc6
Diffstat (limited to 'test/functional/ui/popupmenu_spec.lua')
-rw-r--r--test/functional/ui/popupmenu_spec.lua33
1 files changed, 33 insertions, 0 deletions
diff --git a/test/functional/ui/popupmenu_spec.lua b/test/functional/ui/popupmenu_spec.lua
index 60d59190ce..66b62341a9 100644
--- a/test/functional/ui/popupmenu_spec.lua
+++ b/test/functional/ui/popupmenu_spec.lua
@@ -5853,6 +5853,39 @@ describe('builtin popupmenu', function()
{2:-- INSERT --} |
]])
feed('<Esc>')
+
+ -- Does not highlight the compl leader
+ command('set cot+=menuone,noselect')
+ feed('S<C-X><C-O>')
+ local pum_start = [[
+ {10:^ }|
+ {n:foo }{1: }|
+ {n:bar }{1: }|
+ {n:你好 }{1: }|
+ {1:~ }|*15
+ {2:-- }{8:Back at original} |
+ ]]
+ screen:expect(pum_start)
+ feed('f<C-N>')
+ screen:expect([[
+ {10:f}{9:oo}{10:^ }|
+ {s:foo }{1: }|
+ {1:~ }|*17
+ {2:-- }{5:match 1 of 3} |
+ ]])
+ feed('<C-E><ESC>')
+
+ command('set cot+=fuzzy')
+ feed('S<C-X><C-O>')
+ screen:expect(pum_start)
+ feed('f<C-N>')
+ screen:expect([[
+ {10:foo^ }|
+ {s:foo }{1: }|
+ {1:~ }|*17
+ {2:-- }{5:match 1 of 3} |
+ ]])
+ feed('<Esc>')
end)
end
end