mirror of
https://github.com/hexedtech/codemp-nvim.git
synced 2024-11-22 15:34:53 +01:00
fix: no longer async
This commit is contained in:
parent
0aab5cdd80
commit
a130c24687
2 changed files with 5 additions and 5 deletions
|
@ -125,7 +125,7 @@ local function attach(name, opts)
|
||||||
end
|
end
|
||||||
controller:send({
|
controller:send({
|
||||||
start_idx = start_offset, end_idx = end_offset, content = change_content
|
start_idx = start_offset, end_idx = end_offset, content = change_content
|
||||||
}):await()
|
})
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
@ -177,7 +177,7 @@ local function attach(name, opts)
|
||||||
-- TODO this may happen too soon!!
|
-- TODO this may happen too soon!!
|
||||||
local _ = controller:send({
|
local _ = controller:send({
|
||||||
start_idx = 0, end_idx = #remote_content, content = opts.content
|
start_idx = 0, end_idx = #remote_content, content = opts.content
|
||||||
}) -- no need to await
|
})
|
||||||
else
|
else
|
||||||
local current_content = utils.buffer.get_content(buffer)
|
local current_content = utils.buffer.get_content(buffer)
|
||||||
if current_content ~= remote_content then
|
if current_content ~= remote_content then
|
||||||
|
|
|
@ -63,17 +63,17 @@ local function register_cursor_callback(controller, name)
|
||||||
start_col = cur[1][2],
|
start_col = cur[1][2],
|
||||||
end_row = cur[2][1],
|
end_row = cur[2][1],
|
||||||
end_col = cur[2][2],
|
end_col = cur[2][2],
|
||||||
}) -- no need to await here
|
})
|
||||||
else -- set ourselves "away" only once
|
else -- set ourselves "away" only once
|
||||||
bufname = ""
|
bufname = ""
|
||||||
if once then
|
if once then
|
||||||
local _ = controller:send({
|
controller:send({
|
||||||
buffer = bufname,
|
buffer = bufname,
|
||||||
start_row = 0,
|
start_row = 0,
|
||||||
start_col = 0,
|
start_col = 0,
|
||||||
end_row = 1,
|
end_row = 1,
|
||||||
end_col = 0,
|
end_col = 0,
|
||||||
}) -- no need to await here
|
})
|
||||||
end
|
end
|
||||||
once = false
|
once = false
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue