mirror of
https://github.com/hexedtech/codemp-nvim.git
synced 2024-11-22 07:24:52 +01:00
fix: actually clear usr and check if hl is present
This commit is contained in:
parent
321e6a34bb
commit
81baba98db
1 changed files with 4 additions and 3 deletions
|
@ -118,10 +118,11 @@ local function join(workspace)
|
||||||
if event.type == "leave" then
|
if event.type == "leave" then
|
||||||
if buffers.users[event.value] ~= nil then
|
if buffers.users[event.value] ~= nil then
|
||||||
local buf_name = buffers.users[event.value]
|
local buf_name = buffers.users[event.value]
|
||||||
if buf_name ~= nil then
|
local buf_id = buffers.map_rev[buf_name]
|
||||||
vim.api.nvim_buf_clear_namespace(buffers.map_rev[buf_name], user_hl[event.value].ns, 0, -1)
|
if buf_id ~= nil then
|
||||||
buffers.users[event.value] = nil
|
vim.api.nvim_buf_clear_namespace(buf_id, user_hl[event.value].ns, 0, -1)
|
||||||
end
|
end
|
||||||
|
buffers.users[event.value] = nil
|
||||||
user_hl[event.value] = nil
|
user_hl[event.value] = nil
|
||||||
end
|
end
|
||||||
elseif event.type == "join" then
|
elseif event.type == "join" then
|
||||||
|
|
Loading…
Reference in a new issue