vim-patch:9.2.0455: 'findfunc' only allows extra info for cmdline completion

Problem:  'findfunc' only allows extra info for cmdline completion, not
          for actually finding files (Maxim Kim, after 9.2.0451).
Solution: Handle returning a list of dicts when actually finding files.
          Also fix crash on NULL string (zeertzjq).

fixes:  vim/vim#20163
closes: vim/vim#20164

9694ff58fe
This commit is contained in:
zeertzjq
2026-05-09 07:56:08 +08:00
parent 3aa83dca41
commit 900975d30d
6 changed files with 57 additions and 23 deletions

View File

@@ -3297,9 +3297,8 @@ local options = {
|String| and is the |:find| command argument. The second argument is
a |Boolean| and is set to |v:true| when the function is called to get
a List of command-line completion matches for the |:find| command.
The function should return a List of strings, or, in the command-line
completion case, whatever a |:command-completion-customlist| function
may return.
The function should return a List, which is handled similarly to the
return value of a |:command-completion-customlist| function.
The function is called only once per |:find| command invocation.
The function can process all the directories specified in 'path'.