fix(explorer): always refresh state when opening the picker since changes might have happened that were not monitored

This commit is contained in:
Folke Lemaitre 2025-02-05 15:33:07 +01:00
parent 09349ecd44
commit c61114fb32
No known key found for this signature in database
GPG key ID: 41F8B1FBACAE2040

View file

@ -37,6 +37,8 @@ function State.new(picker)
return v and not v.closed and v or nil return v and not v.closed and v or nil
end end
Tree:refresh(picker:cwd())
local buf = vim.api.nvim_win_get_buf(picker.main) local buf = vim.api.nvim_win_get_buf(picker.main)
local buf_file = vim.fs.normalize(vim.api.nvim_buf_get_name(buf)) local buf_file = vim.fs.normalize(vim.api.nvim_buf_get_name(buf))
if uv.fs_stat(buf_file) then if uv.fs_stat(buf_file) then