Fix cache issue

This commit is contained in:
Lewis Russell 2020-10-28 21:31:13 +00:00
parent 371a838a86
commit 28d6bf5064
1 changed files with 5 additions and 1 deletions

View File

@ -565,6 +565,10 @@ local detach = function(bufnr)
dprint('Detached', bufnr)
local bcache = cache[bufnr]
if not bcache then
return
end
os.remove(bcache.staged)
local w = bcache.index_watcher
@ -574,7 +578,7 @@ local detach = function(bufnr)
dprint('Index_watcher was nil', bufnr)
end
bcache = nil
cache[bufnr] = nil
end
local detach_all = function()