Periodical error
Hello, after just sitting in vim doing some editing i get this error, it does not show that often, but i can't think of the reason why it's showing up.
Error executing vim.schedule lua callback: ...ocal/share/nvim/lazy/hologram.nvim/lua/hologram/init.lua:47: Invalid buffer id: 49
stack traceback:
[C]: in function 'nvim_buf_get_extmarks'
...ocal/share/nvim/lazy/hologram.nvim/lua/hologram/init.lua:47: in function 'buf_render_images'
...ocal/share/nvim/lazy/hologram.nvim/lua/hologram/init.lua:17: in function <...ocal/share/nvim/lazy/hologram.nvim/lua/hologram/init.lua:17>
Other than that, plugin works just fine.
I got it working pretty easily too, but I get the same error message.
In my case, the message is thrown every time I save the buffer :w<Cr>.
Thanks for your time.
same problem
same here if someone knows a fix let me know
I just get a bunch of these errors, and if I ignore them and continue for a while, there seems to be some infinite loop so my whole NeoVim crashes. Adding a check for invalid bufnr is trivial; add the check in lua/hologram/init.lua
function hologram.buf_render_images(buf, top, bot)
if not vim.fn.bufexists(buf) then
return
end
...
but the plugin is still unable to remove images again when I switch to a different buffer. This makes hologram unusable at present.
This PR fixes the issue. For anyone encountering this later, just switch to lucasdf/hologram.nvim to get the fix.