mirror of
https://github.com/hexedtech/codemp-nvim.git
synced 2024-11-21 23:14:54 +01:00
fix: only clear user hl if was present
This commit is contained in:
parent
d98f6707d0
commit
321e6a34bb
1 changed files with 4 additions and 2 deletions
|
@ -118,8 +118,10 @@ local function join(workspace)
|
|||
if event.type == "leave" then
|
||||
if buffers.users[event.value] ~= nil then
|
||||
local buf_name = buffers.users[event.value]
|
||||
vim.api.nvim_buf_clear_namespace(buffers.map_rev[buf_name], user_hl[event.value].ns, 0, -1)
|
||||
buffers.users[event.value] = nil
|
||||
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
|
||||
end
|
||||
user_hl[event.value] = nil
|
||||
end
|
||||
elseif event.type == "join" then
|
||||
|
|
Loading…
Reference in a new issue