mirror of
https://github.com/hexedtech/codemp-nvim.git
synced 2024-11-22 15:34:53 +01:00
fix: set tick also when resynching
This commit is contained in:
parent
cc9b6769c2
commit
ce6670fdb7
1 changed files with 2 additions and 0 deletions
|
@ -143,6 +143,7 @@ local function attach(name, opts)
|
|||
if event.hash ~= nil and CODEMP.native.hash(utils.buffer.get_content(buffer)) ~= event.hash then
|
||||
if CODEMP.config.auto_sync then
|
||||
print(" /!\\ out of sync, resynching...")
|
||||
ticks[buffer] = vim.api.nvim_buf_get_changedtick(buffer)
|
||||
utils.buffer.set_content(buffer, controller:content():await())
|
||||
else
|
||||
vim.ui.select(
|
||||
|
@ -150,6 +151,7 @@ local function attach(name, opts)
|
|||
{ prompt = "out of sync! force resync or detach?" },
|
||||
function (choice)
|
||||
if choice == "sync" then
|
||||
ticks[buffer] = vim.api.nvim_buf_get_changedtick(buffer)
|
||||
utils.buffer.set_content(buffer, controller:content():await())
|
||||
end
|
||||
if choice == "detach" then
|
||||
|
|
Loading…
Reference in a new issue