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) register_cursor_handler(ws)
-- TODO this is temporary and ad-hoc -- TODO this is temporary and ad-hoc
ws:callback(function (event) -- ws:callback(function (event)
if event.type == "leave" then -- if event.type == "leave" then
if buffers.users[event.value] ~= nil then -- if buffers.users[event.value] ~= nil then
vim.schedule(function () -- vim.schedule(function ()
vim.api.nvim_buf_clear_namespace(buffers.users[event.value], user_hl[event.value].ns, 0, -1) -- vim.api.nvim_buf_clear_namespace(buffers.users[event.value], user_hl[event.value].ns, 0, -1)
buffers.users[event.value] = nil -- buffers.users[event.value] = nil
user_hl[event.value] = nil -- user_hl[event.value] = nil
end) -- end)
end -- end
end -- end
vim.schedule(function() window.update() end) -- vim.schedule(function() window.update() end)
end) -- end)
session.workspace = ws session.workspace = ws
window.update() window.update()