mirror of
https://github.com/hexedtech/codemp-nvim.git
synced 2024-11-24 16:34:50 +01:00
fix: collect garbage when detaching for faster dc
This commit is contained in:
parent
455ec025c1
commit
8a4e6e828a
1 changed files with 3 additions and 3 deletions
|
@ -165,11 +165,11 @@ local function detach(name)
|
||||||
id_buffer_map[buffer] = nil
|
id_buffer_map[buffer] = nil
|
||||||
buffer_id_map[name] = nil
|
buffer_id_map[name] = nil
|
||||||
if not CODEMP.workspace:detach(name) then
|
if not CODEMP.workspace:detach(name) then
|
||||||
print(" /!\\ dangling reference, detach incomplete")
|
collectgarbage("collect") -- clear dangling references
|
||||||
else
|
|
||||||
print(" -- detached from buffer " .. name)
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
print(" -- detached from buffer " .. name)
|
||||||
|
|
||||||
require('codemp.window').update()
|
require('codemp.window').update()
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue