diff --git a/lua/codemp/buffers.lua b/lua/codemp/buffers.lua index fb47735..884333b 100644 --- a/lua/codemp/buffers.lua +++ b/lua/codemp/buffers.lua @@ -125,7 +125,7 @@ local function attach(name, opts) end controller:send({ start_idx = start_offset, end_idx = end_offset, content = change_content - }):await() + }) end, }) @@ -177,7 +177,7 @@ local function attach(name, opts) -- TODO this may happen too soon!! local _ = controller:send({ start_idx = 0, end_idx = #remote_content, content = opts.content - }) -- no need to await + }) else local current_content = utils.buffer.get_content(buffer) if current_content ~= remote_content then diff --git a/lua/codemp/workspace.lua b/lua/codemp/workspace.lua index d9400e1..2545b3e 100644 --- a/lua/codemp/workspace.lua +++ b/lua/codemp/workspace.lua @@ -63,17 +63,17 @@ local function register_cursor_callback(controller, name) start_col = cur[1][2], end_row = cur[2][1], end_col = cur[2][2], - }) -- no need to await here + }) else -- set ourselves "away" only once bufname = "" if once then - local _ = controller:send({ + controller:send({ buffer = bufname, start_row = 0, start_col = 0, end_row = 1, end_col = 0, - }) -- no need to await here + }) end once = false end