mirror of
https://github.com/hexedtech/codemp-nvim.git
synced 2024-12-23 05:44: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 buffers.users[event.value] ~= nil then
|
||||
local buf_name = buffers.users[event.value]
|
||||
if buf_name ~= nil then
|
||||
vim.api.nvim_buf_clear_namespace(buffers.map_rev[buf_name], user_hl[event.value].ns, 0, -1)
|
||||
buffers.users[event.value] = nil
|
||||
local buf_id = buffers.map_rev[buf_name]
|
||||
if buf_id ~= nil then
|
||||
vim.api.nvim_buf_clear_namespace(buf_id, user_hl[event.value].ns, 0, -1)
|
||||
end
|
||||
buffers.users[event.value] = nil
|
||||
user_hl[event.value] = nil
|
||||
end
|
||||
elseif event.type == "join" then
|
||||
|
|
Loading…
Reference in a new issue