mirror of
https://github.com/folke/snacks.nvim
synced 2025-12-23 08:47:57 +00:00
fix(picker.filter): get cwd from active tabpage if available
This commit is contained in:
parent
52f30a198a
commit
c1b517f545
1 changed files with 1 additions and 1 deletions
|
|
@ -38,7 +38,7 @@ function M:init(opts)
|
|||
self.all = not self.opts or not (self.opts.cwd or self.opts.buf or self.opts.paths or self.opts.filter)
|
||||
self.paths = {}
|
||||
local cwd = self.opts and self.opts.cwd
|
||||
self.cwd = type(cwd) == "string" and cwd or opts.cwd or uv.cwd() or "."
|
||||
self.cwd = type(cwd) == "string" and cwd or opts.cwd or vim.fn.getcwd(0)
|
||||
self.cwd = svim.fs.normalize(self.cwd --[[@as string]], { _fast = true })
|
||||
if not self.all and self.opts then
|
||||
self.buf = self.opts.buf == true and 0 or self.opts.buf --[[@as number?]]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue