mirror of
https://github.com/hexedtech/codemp-nvim.git
synced 2024-11-22 07:24:52 +01:00
fix: temporary userdata type check rather than nil
This commit is contained in:
parent
3769b2b216
commit
683376be6e
1 changed files with 4 additions and 1 deletions
|
@ -140,7 +140,10 @@ local function attach(name, opts)
|
|||
if event == nil then break end
|
||||
|
||||
-- error detection
|
||||
if event.hash ~= nil and CODEMP.native.hash(utils.buffer.get_content(buffer)) ~= event.hash then
|
||||
-- TODO Option::None gets serialized as userdata : NULL, so nil check doesnt work...
|
||||
-- next version field will be skipped if hash is None
|
||||
--if event.hash ~= nil and CODEMP.native.hash(utils.buffer.get_content(buffer)) ~= event.hash then
|
||||
if type(event.hash) ~= "userdata" 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)
|
||||
|
|
Loading…
Reference in a new issue