mirror of
https://github.com/hexedtech/codemp-nvim.git
synced 2024-11-22 07:24:52 +01:00
fix: buf tick equals
in theory it should always be the same, because we call set_content() and before that resolves our callback runs. HOWEVER, i dont know, nvim is driving me insane...
This commit is contained in:
parent
a3fa3ea743
commit
222869464f
1 changed files with 1 additions and 1 deletions
|
@ -83,7 +83,7 @@ local function attach(name, opts)
|
||||||
-- TODO breaks when deleting whole lines at buffer end
|
-- TODO breaks when deleting whole lines at buffer end
|
||||||
vim.api.nvim_buf_attach(buffer, false, {
|
vim.api.nvim_buf_attach(buffer, false, {
|
||||||
on_bytes = function(_, buf, tick, start_row, start_col, start_offset, old_end_row, old_end_col, old_end_byte_len, new_end_row, new_end_col, new_byte_len)
|
on_bytes = function(_, buf, tick, start_row, start_col, start_offset, old_end_row, old_end_col, old_end_byte_len, new_end_row, new_end_col, new_byte_len)
|
||||||
if tick <= ticks[buf] then return end
|
if tick == ticks[buf] then return end
|
||||||
if id_buffer_map[buf] == nil then return true end -- unregister callback handler
|
if id_buffer_map[buf] == nil then return true end -- unregister callback handler
|
||||||
if CODEMP.config.debug then print(string.format(
|
if CODEMP.config.debug then print(string.format(
|
||||||
"start(row:%s, col:%s) offset:%s end(row:%s, col:%s new(row:%s, col:%s)) len(old:%s, new:%s)",
|
"start(row:%s, col:%s) offset:%s end(row:%s, col:%s new(row:%s, col:%s)) len(old:%s, new:%s)",
|
||||||
|
|
Loading…
Reference in a new issue