mirror of
https://github.com/folke/snacks.nvim
synced 2025-08-05 03:08:13 +00:00
fix(explorer.git): better git status watching
This commit is contained in:
parent
04d4bd7475
commit
09349ecd44
1 changed files with 2 additions and 2 deletions
|
@ -15,7 +15,7 @@ M.state = {} ---@type table<string, {tick: number, last: number}>
|
|||
function M.refresh(path)
|
||||
for root in pairs(M.state) do
|
||||
if path == root or path:find(root .. "/", 1, true) == 1 then
|
||||
M.state[root] = nil
|
||||
M.state[root].last = 0
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -26,7 +26,7 @@ function M.is_dirty(cwd)
|
|||
if not root then
|
||||
return false
|
||||
end
|
||||
return M.state[root] == nil
|
||||
return M.state[root] == nil or M.state[root].last == 0
|
||||
end
|
||||
|
||||
---@param cwd string
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue