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 event.hash ~= nil and CODEMP.native.hash(utils.buffer.get_content(buffer)) ~= event.hash then
|
||||||
if CODEMP.config.auto_sync then
|
if CODEMP.config.auto_sync then
|
||||||
print(" /!\\ out of sync, resynching...")
|
print(" /!\\ out of sync, resynching...")
|
||||||
|
ticks[buffer] = vim.api.nvim_buf_get_changedtick(buffer)
|
||||||
utils.buffer.set_content(buffer, controller:content():await())
|
utils.buffer.set_content(buffer, controller:content():await())
|
||||||
else
|
else
|
||||||
vim.ui.select(
|
vim.ui.select(
|
||||||
|
@ -150,6 +151,7 @@ local function attach(name, opts)
|
||||||
{ prompt = "out of sync! force resync or detach?" },
|
{ prompt = "out of sync! force resync or detach?" },
|
||||||
function (choice)
|
function (choice)
|
||||||
if choice == "sync" then
|
if choice == "sync" then
|
||||||
|
ticks[buffer] = vim.api.nvim_buf_get_changedtick(buffer)
|
||||||
utils.buffer.set_content(buffer, controller:content():await())
|
utils.buffer.set_content(buffer, controller:content():await())
|
||||||
end
|
end
|
||||||
if choice == "detach" then
|
if choice == "detach" then
|
||||||
|
|
Loading…
Reference in a new issue