fix(explorer): cwd is now changed automatically, so no need to update state.

This commit is contained in:
Folke Lemaitre 2025-01-31 22:22:26 +01:00
parent abd9e0daec
commit 5549d4e848
No known key found for this signature in database
GPG key ID: 41F8B1FBACAE2040

View file

@ -268,6 +268,7 @@ function State:dir()
end
function State:set_cwd(cwd)
cwd = vim.fs.normalize(cwd)
self.cwd = cwd
self.expanded[cwd] = true
for k in pairs(self.expanded) do
@ -435,7 +436,6 @@ M.actions = {
explorer_cd = function(picker)
local state = M.get_state(picker)
vim.fn.chdir(state:dir())
state:set_cwd(vim.fn.getcwd())
end,
confirm = function(picker)
local state = M.get_state(picker)