patch 9.1.1699: Fuzzy completion disabled for 'findfunc' and customlist
Problem: Fuzzy completion disabled for 'findfunc' and customlist
Solution: Remove those cases from cmdline_fuzzy_completion_supported()
because it is supported (Maxim Kim).
fixes: #18117
closes: #18122
Signed-off-by: Maxim Kim <habamax@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
committed by
Christian Brabandt
parent
b760062897
commit
cadba05329
@ -58,7 +58,6 @@ cmdline_fuzzy_completion_supported(expand_T *xp)
|
|||||||
case EXPAND_FILES_IN_PATH:
|
case EXPAND_FILES_IN_PATH:
|
||||||
case EXPAND_FILETYPE:
|
case EXPAND_FILETYPE:
|
||||||
case EXPAND_FILETYPECMD:
|
case EXPAND_FILETYPECMD:
|
||||||
case EXPAND_FINDFUNC:
|
|
||||||
case EXPAND_HELP:
|
case EXPAND_HELP:
|
||||||
case EXPAND_KEYMAP:
|
case EXPAND_KEYMAP:
|
||||||
case EXPAND_OLD_SETTING:
|
case EXPAND_OLD_SETTING:
|
||||||
@ -71,7 +70,6 @@ cmdline_fuzzy_completion_supported(expand_T *xp)
|
|||||||
case EXPAND_SHELLCMDLINE:
|
case EXPAND_SHELLCMDLINE:
|
||||||
case EXPAND_TAGS:
|
case EXPAND_TAGS:
|
||||||
case EXPAND_TAGS_LISTFILES:
|
case EXPAND_TAGS_LISTFILES:
|
||||||
case EXPAND_USER_LIST:
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|||||||
10
src/testdir/dumps/Test_wildmenu_pum_hl_match_find_1.dump
Normal file
10
src/testdir/dumps/Test_wildmenu_pum_hl_match_find_1.dump
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
| +0&#ffffff0@49
|
||||||
|
|~+0#4040ff13&| @48
|
||||||
|
|~| @48
|
||||||
|
|~| @48
|
||||||
|
|~| @48
|
||||||
|
|~| @48
|
||||||
|
|~| @48
|
||||||
|
|~| @3| +0#0000001#e0e0e08|h+1&&|e|l+0&&@1|o|/|w+1&&|o|r+0&&|l|d| @4| +0#4040ff13#ffffff0@27
|
||||||
|
|~| @3| +0#0000001#ffd7ff255|h+1&&|e|l+0&&@1|o|/|w+1&&|o|n+0&&|d|e|r|f|u|l| | +0#4040ff13#ffffff0@27
|
||||||
|
|:+0#0000000&|f|i|n|d| |h|e|l@1|o|/|w|o|r|l|d> @32
|
||||||
10
src/testdir/dumps/Test_wildmenu_pum_hl_match_find_2.dump
Normal file
10
src/testdir/dumps/Test_wildmenu_pum_hl_match_find_2.dump
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
| +0&#ffffff0@49
|
||||||
|
|~+0#4040ff13&| @48
|
||||||
|
|~| @48
|
||||||
|
|~| @48
|
||||||
|
|~| @48
|
||||||
|
|~| @48
|
||||||
|
|~| @48
|
||||||
|
|~| @3| +0#0000001#e0e0e08|h|e|l@1|o|/|w|o|r|l|d| @4| +0#4040ff13#ffffff0@27
|
||||||
|
|~| @3| +0#0000001#ffd7ff255|h|e|l@1|o|/|w|o|n|d|e|r|f|u|l| | +0#4040ff13#ffffff0@27
|
||||||
|
|:+0#0000000&|f|i|n|d| |h|e|l@1|o|/|w|o|r|l|d> @32
|
||||||
10
src/testdir/dumps/Test_wildmenu_pum_hl_match_list_1.dump
Normal file
10
src/testdir/dumps/Test_wildmenu_pum_hl_match_list_1.dump
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
| +0&#ffffff0@49
|
||||||
|
|~+0#4040ff13&| @48
|
||||||
|
|~| @48
|
||||||
|
|~| @48
|
||||||
|
|~| @48
|
||||||
|
|~| @48
|
||||||
|
|~| @48
|
||||||
|
|~| @4| +0#0000001#e0e0e08|h+1&&|e|l+0&&@1|o|/|w+1&&|o|r+0&&|l|d| @4| +0#4040ff13#ffffff0@26
|
||||||
|
|~| @4| +0#0000001#ffd7ff255|h+1&&|e|l+0&&@1|o|/|w+1&&|o|n+0&&|d|e|r|f|u|l| | +0#4040ff13#ffffff0@26
|
||||||
|
|:+0#0000000&|L|i|s|t|T| |h|e|l@1|o|/|w|o|r|l|d> @31
|
||||||
10
src/testdir/dumps/Test_wildmenu_pum_hl_match_list_2.dump
Normal file
10
src/testdir/dumps/Test_wildmenu_pum_hl_match_list_2.dump
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
| +0&#ffffff0@49
|
||||||
|
|~+0#4040ff13&| @48
|
||||||
|
|~| @48
|
||||||
|
|~| @48
|
||||||
|
|~| @48
|
||||||
|
|~| @48
|
||||||
|
|~| @48
|
||||||
|
|~| @4| +0#0000001#e0e0e08|h|e|l@1|o|/|w|o|r|l|d| @4| +0#4040ff13#ffffff0@26
|
||||||
|
|~| @4| +0#0000001#ffd7ff255|h|e|l@1|o|/|w|o|n|d|e|r|f|u|l| | +0#4040ff13#ffffff0@26
|
||||||
|
|:+0#0000000&|L|i|s|t|T| |h|e|l@1|o|/|w|o|r|l|d> @31
|
||||||
@ -3120,6 +3120,62 @@ func Test_wildmenu_pum_hl_match()
|
|||||||
call StopVimInTerminal(buf)
|
call StopVimInTerminal(buf)
|
||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
|
" Test highlighting of matched text in cmdline completion popup menu provided
|
||||||
|
" by a command completed with customlist.
|
||||||
|
func Test_wildmenu_pum_hl_match_list()
|
||||||
|
CheckScreendump
|
||||||
|
|
||||||
|
let lines =<< trim END
|
||||||
|
set wildoptions=pum,fuzzy
|
||||||
|
hi PmenuMatchSel cterm=reverse
|
||||||
|
hi PmenuMatch cterm=reverse
|
||||||
|
command -nargs=1 -complete=customlist,ListComplete ListT echo <q-args>
|
||||||
|
func ListComplete(A, B, C)
|
||||||
|
return ['hello/world', 'hello/wonderful']->matchfuzzy(a:A)
|
||||||
|
endfunc
|
||||||
|
END
|
||||||
|
call writefile(lines, 'Xwildmenu_pum_hl', 'D')
|
||||||
|
let buf = RunVimInTerminal('-S Xwildmenu_pum_hl', #{rows: 10, cols: 50})
|
||||||
|
|
||||||
|
call term_sendkeys(buf, ":ListT hewo\<Tab>")
|
||||||
|
call VerifyScreenDump(buf, 'Test_wildmenu_pum_hl_match_list_1', {})
|
||||||
|
call term_sendkeys(buf, "\<Esc>:set wildoptions-=fuzzy\<CR>")
|
||||||
|
call TermWait(buf)
|
||||||
|
call term_sendkeys(buf, ":ListT hewo\<Tab>")
|
||||||
|
call VerifyScreenDump(buf, 'Test_wildmenu_pum_hl_match_list_2', {})
|
||||||
|
call term_sendkeys(buf, "\<Esc>")
|
||||||
|
|
||||||
|
call StopVimInTerminal(buf)
|
||||||
|
endfunc
|
||||||
|
|
||||||
|
" Test highlighting of matched text in cmdline completion popup menu provided
|
||||||
|
" by a custom 'findfunc'
|
||||||
|
func Test_wildmenu_pum_hl_match_findfunc()
|
||||||
|
CheckScreendump
|
||||||
|
|
||||||
|
let lines =<< trim END
|
||||||
|
set wildoptions=pum,fuzzy
|
||||||
|
hi PmenuMatchSel cterm=reverse
|
||||||
|
hi PmenuMatch cterm=reverse
|
||||||
|
func FindComplete(cmdarg, cmdcomplete)
|
||||||
|
return ['hello/world', 'hello/wonderful']->matchfuzzy(a:cmdarg)
|
||||||
|
endfunc
|
||||||
|
set findfunc=FindComplete
|
||||||
|
END
|
||||||
|
call writefile(lines, 'Xwildmenu_pum_hl', 'D')
|
||||||
|
let buf = RunVimInTerminal('-S Xwildmenu_pum_hl', #{rows: 10, cols: 50})
|
||||||
|
|
||||||
|
call term_sendkeys(buf, ":find hewo\<Tab>")
|
||||||
|
call VerifyScreenDump(buf, 'Test_wildmenu_pum_hl_match_find_1', {})
|
||||||
|
call term_sendkeys(buf, "\<Esc>:set wildoptions-=fuzzy\<CR>")
|
||||||
|
call TermWait(buf)
|
||||||
|
call term_sendkeys(buf, ":find hewo\<Tab>")
|
||||||
|
call VerifyScreenDump(buf, 'Test_wildmenu_pum_hl_match_find_2', {})
|
||||||
|
call term_sendkeys(buf, "\<Esc>")
|
||||||
|
|
||||||
|
call StopVimInTerminal(buf)
|
||||||
|
endfunc
|
||||||
|
|
||||||
" Test for completion after a :substitute command followed by a pipe (|)
|
" Test for completion after a :substitute command followed by a pipe (|)
|
||||||
" character
|
" character
|
||||||
func Test_cmdline_complete_substitute()
|
func Test_cmdline_complete_substitute()
|
||||||
|
|||||||
@ -724,6 +724,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
1699,
|
||||||
/**/
|
/**/
|
||||||
1698,
|
1698,
|
||||||
/**/
|
/**/
|
||||||
|
|||||||
Reference in New Issue
Block a user