mirror of
https://github.com/neovim/neovim
synced 2025-07-16 01:01:49 +00:00
vim-patch:9.1.0821: 'findexpr' completion doesn't set v:fname to cmdline argument
Problem: 'findexpr' completion doesn't set v:fname to cmdline argument.
Solution: Set v:fname to the cmdline argument as-is (zeertzjq).
closes: vim/vim#15934
20e045f781
This commit is contained in:
7
runtime/lua/vim/_meta/options.lua
generated
7
runtime/lua/vim/_meta/options.lua
generated
@ -2304,6 +2304,10 @@ vim.go.fcs = vim.go.fillchars
|
||||
--- The expression is evaluated only once per `:find` command invocation.
|
||||
--- The expression can process all the directories specified in 'path'.
|
||||
---
|
||||
--- The expression may be evaluated for command-line completion as well,
|
||||
--- in which case the `v:cmdcomplete` variable will be set to `v:true`,
|
||||
--- otherwise it will be set to `v:false`.
|
||||
---
|
||||
--- If a match is found, the expression should return a `List` containing
|
||||
--- one or more file names. If a match is not found, the expression
|
||||
--- should return an empty List.
|
||||
@ -2324,7 +2328,8 @@ vim.go.fcs = vim.go.fillchars
|
||||
--- ```vim
|
||||
--- " Use glob()
|
||||
--- func FindExprGlob()
|
||||
--- return glob(v:fname, v:false, v:true)
|
||||
--- let pat = v:cmdcomplete ? $'{v:fname}*' : v:fname
|
||||
--- return glob(pat, v:false, v:true)
|
||||
--- endfunc
|
||||
--- set findexpr=FindExprGlob()
|
||||
---
|
||||
|
Reference in New Issue
Block a user