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