aboutsummaryrefslogtreecommitdiff
path: root/test/functional/ui
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2025-03-07 08:18:33 +0800
committerzeertzjq <zeertzjq@outlook.com>2025-03-27 07:26:42 +0800
commit90d59e6c8aa6141c54f81586df423e5a76e009f9 (patch)
tree270e4b17b890ce56f1e0763385330f6b53edebbc /test/functional/ui
parent30293575204bc6b1cdc8a7e06af2710921d46da2 (diff)
downloadrneovim-90d59e6c8aa6141c54f81586df423e5a76e009f9.tar.gz
rneovim-90d59e6c8aa6141c54f81586df423e5a76e009f9.tar.bz2
rneovim-90d59e6c8aa6141c54f81586df423e5a76e009f9.zip
vim-patch:9.1.1178: not possible to generate completion candidates using fuzzy matching
Problem: not possible to generate completion candidates using fuzzy matching Solution: add the 'completefuzzycollect' option for (some) ins-completion modes (glepnir) fixes vim/vim#15296 fixes vim/vim#15295 fixes vim/vim#15294 closes: vim/vim#16032 https://github.com/vim/vim/commit/f31cfa29bf72b0cdf6fa1b60346ea4e187bcafd1 Co-authored-by: glepnir <glephunter@gmail.com>
Diffstat (limited to 'test/functional/ui')
-rw-r--r--test/functional/ui/popupmenu_spec.lua60
1 files changed, 33 insertions, 27 deletions
diff --git a/test/functional/ui/popupmenu_spec.lua b/test/functional/ui/popupmenu_spec.lua
index 76673c84b8..9403f39ba1 100644
--- a/test/functional/ui/popupmenu_spec.lua
+++ b/test/functional/ui/popupmenu_spec.lua
@@ -6932,25 +6932,48 @@ describe('builtin popupmenu', function()
]])
feed('o<BS><C-R>=Comp()<CR>')
screen:expect_unchanged(true)
+ feed('<C-E><Esc>')
+
+ command('hi PmenuMatchSel guibg=NONE')
+ command('hi PmenuMatch guibg=NONE')
+ command('set cot=menu,noinsert,fuzzy')
+ feed('S<C-X><C-O>')
+ screen:expect(pum_start)
+ feed('fb')
+ screen:expect([[
+ fb^ |
+ {ms:f}{s:oo}{ms:B}{s:az fookind }{1: }|
+ {mn:f}{n:oo}{mn:b}{n:ar fookind }{1: }|
+ {mn:f}{n:oo}{mn:b}{n:ala fookind }{1: }|
+ {1:~ }|*15
+ {2:-- }{5:match 1 of 9} |
+ ]])
+
+ feed('<C-E><Esc>')
+ end)
+
+ it('completefuzzycollect', function()
+ exec([[
+ set completefuzzycollect=keyword,files
+ set completeopt=menu,menuone
+ ]])
- 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:ero }{1: }|
- {1:~ }{n: }{mn:h}{n:elio }{1: }|
- {1:~ }{s: }{ms:h}{s:ello }{1: }|
+ hello helio hero hello^ |
+ {1:~ }{n: hero }{1: }|
+ {1:~ }{n: helio }{1: }|
+ {1:~ }{s: hello }{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:ero }{1: }|
- {1:~ }{s: }{ms:h}{s:elio }{1: }|
- {1:~ }{n: }{mn:h}{n:ello }{1: }|
+ hello helio hero helio^ |
+ {1:~ }{n: hero }{1: }|
+ {1:~ }{s: helio }{1: }|
+ {1:~ }{n: hello }{1: }|
{1:~ }|*15
{2:-- }{5:match 2 of 3} |
]])
@@ -6962,23 +6985,6 @@ describe('builtin popupmenu', function()
{2:-- }{6:Pattern not found} |
]])
feed('<C-E><Esc>')
-
- command('hi PmenuMatchSel guibg=NONE')
- command('hi PmenuMatch guibg=NONE')
- command('set cot=menu,noinsert,fuzzy')
- feed('S<C-X><C-O>')
- screen:expect(pum_start)
- feed('fb')
- screen:expect([[
- fb^ |
- {ms:f}{s:oo}{ms:B}{s:az fookind }{1: }|
- {mn:f}{n:oo}{mn:b}{n:ar fookind }{1: }|
- {mn:f}{n:oo}{mn:b}{n:ala fookind }{1: }|
- {1:~ }|*15
- {2:-- }{5:match 1 of 9} |
- ]])
-
- feed('<C-E><Esc>')
end)
-- oldtest: Test_pum_highlights_match_with_abbr()