mirror of
https://github.com/hexedtech/codemp-nvim.git
synced 2024-11-22 23:44:55 +01:00
fix: ack when applying changes
This commit is contained in:
parent
c92b1799b6
commit
7f0dd45ac0
1 changed files with 3 additions and 0 deletions
|
@ -142,6 +142,9 @@ local function attach(name, opts)
|
||||||
print(" ~~ applying change ~~ " .. event.change.start_idx .. ".." .. event.change.end_idx .. "::[" .. event.change.content .. "]")
|
print(" ~~ applying change ~~ " .. event.change.start_idx .. ".." .. event.change.end_idx .. "::[" .. event.change.content .. "]")
|
||||||
end
|
end
|
||||||
utils.buffer.set_content(buffer, event.change.content, event.change.start_idx, event.change.end_idx)
|
utils.buffer.set_content(buffer, event.change.content, event.change.start_idx, event.change.end_idx)
|
||||||
|
controller:ack(event.version)
|
||||||
|
|
||||||
|
-- error detection
|
||||||
if event.hash ~= nil then
|
if event.hash ~= nil then
|
||||||
if CODEMP.native.hash(utils.buffer.get_content(buffer)) ~= event.hash then
|
if CODEMP.native.hash(utils.buffer.get_content(buffer)) ~= event.hash then
|
||||||
if CODEMP.config.auto_sync then
|
if CODEMP.config.auto_sync then
|
||||||
|
|
Loading…
Reference in a new issue