mirror of
https://github.com/hexedtech/codemp-nvim.git
synced 2024-11-23 16:04:51 +01:00
fix: update window after disconnecting
This commit is contained in:
parent
594330c721
commit
f5a5287065
3 changed files with 3 additions and 0 deletions
|
@ -87,6 +87,7 @@ local connected_actions = {
|
||||||
print(" xx disconnecting client " .. CODEMP.client.id)
|
print(" xx disconnecting client " .. CODEMP.client.id)
|
||||||
CODEMP.client = nil -- should drop and thus close everything
|
CODEMP.client = nil -- should drop and thus close everything
|
||||||
collectgarbage("collect") -- make sure we drop
|
collectgarbage("collect") -- make sure we drop
|
||||||
|
require('codemp.window').update()
|
||||||
end,
|
end,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -46,6 +46,7 @@ if CODEMP == nil then
|
||||||
CODEMP.client = nil -- drop reference so it gets garbage collected
|
CODEMP.client = nil -- drop reference so it gets garbage collected
|
||||||
end
|
end
|
||||||
CODEMP.rt:stop()
|
CODEMP.rt:stop()
|
||||||
|
require('codemp.window').update()
|
||||||
end
|
end
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
|
@ -118,6 +118,7 @@ M.delete = function(state, path, extra)
|
||||||
if not choice or not vim.startswith(string.lower(choice), "y") then return end
|
if not choice or not vim.startswith(string.lower(choice), "y") then return end
|
||||||
if CODEMP.workspace ~= nil then ws_manager.leave() end
|
if CODEMP.workspace ~= nil then ws_manager.leave() end
|
||||||
CODEMP.client = nil
|
CODEMP.client = nil
|
||||||
|
manager.refresh("codemp")
|
||||||
collectgarbage("collect") -- to make sure we drop the reference and disconnect
|
collectgarbage("collect") -- to make sure we drop the reference and disconnect
|
||||||
end)
|
end)
|
||||||
elseif selected.type == "root" and vim.startswith(selected.name, "#") then
|
elseif selected.type == "root" and vim.startswith(selected.name, "#") then
|
||||||
|
|
Loading…
Reference in a new issue