From c1b517f545fffcf401217bd41202833ee6465f31 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Tue, 28 Oct 2025 08:43:37 +0100 Subject: [PATCH] fix(picker.filter): get cwd from active tabpage if available --- lua/snacks/picker/core/filter.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/snacks/picker/core/filter.lua b/lua/snacks/picker/core/filter.lua index b1723957..884923ea 100644 --- a/lua/snacks/picker/core/filter.lua +++ b/lua/snacks/picker/core/filter.lua @@ -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?]]