fix: disable workspace event callback

its not available anymore
This commit is contained in:
əlemi 2024-09-05 04:38:12 +02:00
parent c52c26e46b
commit 4c9879a4e7
Signed by: alemi
GPG key ID: A4895B84D311642C

View file

@ -89,18 +89,18 @@ local function join(workspace)
register_cursor_handler(ws)
-- TODO this is temporary and ad-hoc
ws:callback(function (event)
if event.type == "leave" then
if buffers.users[event.value] ~= nil then
vim.schedule(function ()
vim.api.nvim_buf_clear_namespace(buffers.users[event.value], user_hl[event.value].ns, 0, -1)
buffers.users[event.value] = nil
user_hl[event.value] = nil
end)
end
end
vim.schedule(function() window.update() end)
end)
-- ws:callback(function (event)
-- if event.type == "leave" then
-- if buffers.users[event.value] ~= nil then
-- vim.schedule(function ()
-- vim.api.nvim_buf_clear_namespace(buffers.users[event.value], user_hl[event.value].ns, 0, -1)
-- buffers.users[event.value] = nil
-- user_hl[event.value] = nil
-- end)
-- end
-- end
-- vim.schedule(function() window.update() end)
-- end)
session.workspace = ws
window.update()