mirror of
https://github.com/LazyVim/LazyVim.git
synced 2026-07-25 14:01:06 +00:00
fix(fzf): correctly pass opts.cwd when root=false
This commit is contained in:
parent
fe667b53c9
commit
76c5ee408f
1 changed files with 4 additions and 4 deletions
|
|
@ -34,13 +34,13 @@ function M.open(command, opts)
|
|||
opts.cwd = LazyVim.root({ buf = opts.buf })
|
||||
end
|
||||
|
||||
local cwd = opts.cwd or vim.uv.cwd()
|
||||
opts.cwd = opts.cwd or vim.uv.cwd()
|
||||
if command == "auto" then
|
||||
command = "files"
|
||||
if
|
||||
vim.uv.fs_stat(cwd .. "/.git")
|
||||
and not vim.uv.fs_stat(cwd .. "/.ignore")
|
||||
and not vim.uv.fs_stat(cwd .. "/.rgignore")
|
||||
vim.uv.fs_stat(opts.cwd .. "/.git")
|
||||
and not vim.uv.fs_stat(opts.cwd .. "/.ignore")
|
||||
and not vim.uv.fs_stat(opts.cwd .. "/.rgignore")
|
||||
then
|
||||
command = "git_files"
|
||||
opts.show_untracked = opts.show_untracked ~= false
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue