mirror of
https://github.com/hexedtech/codemp-nvim.git
synced 2024-12-23 22:04:52 +01:00
fix: move buffer callback after
This commit is contained in:
parent
a250502a6d
commit
c52c26e46b
1 changed files with 3 additions and 2 deletions
|
@ -78,13 +78,14 @@ local function attach(name, buffer, content)
|
|||
end
|
||||
end
|
||||
end))
|
||||
controller:callback(function (_controller) async:send() end)
|
||||
vim.defer_fn(function() async:send() end, 500) -- force a try_recv after 500ms
|
||||
|
||||
local remote_content = controller:content():await()
|
||||
ticks[buffer] = vim.api.nvim_buf_get_changedtick(buffer)
|
||||
utils.buffer.set_content(buffer, remote_content)
|
||||
|
||||
controller:callback(function (_controller) async:send() end)
|
||||
vim.defer_fn(function() async:send() end, 500) -- force a try_recv after 500ms
|
||||
|
||||
print(" ++ attached to buffer " .. name)
|
||||
return controller
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue