From 4c9879a4e7916f35b31795fc2686e601e437b4dc Mon Sep 17 00:00:00 2001 From: alemi Date: Thu, 5 Sep 2024 04:38:12 +0200 Subject: [PATCH] fix: disable workspace event callback its not available anymore --- src/workspace.lua | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/src/workspace.lua b/src/workspace.lua index 10d1690..55ad885 100644 --- a/src/workspace.lua +++ b/src/workspace.lua @@ -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()