Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle error on nvim_buf_get_extmarks #26

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

lucasdf
Copy link

@lucasdf lucasdf commented Oct 24, 2022

I am getting this error when closing the autocomplete buffer/popup:

Error executing vim.schedule lua callback: ...te/pack/packer/start/hologram.nvim/lua/hologram/init.lua:47: Invalid buffer id: 7                                                                                                                                                                                        
stack traceback:
        [C]: in function 'nvim_buf_get_extmarks'
        ...te/pack/packer/start/hologram.nvim/lua/hologram/init.lua:47: in function 'buf_render_images'
        ...te/pack/packer/start/hologram.nvim/lua/hologram/init.lua:17: in function <...te/pack/packer/start/hologram.nvim/lua/hologram/init.lua:17>

It seems nvim_buf_get_extmarks can throw an error in case the buffer doesn't exist anymore, so it might be a good idea to skip it in case it throws.

@TamaMcGlinn TamaMcGlinn mentioned this pull request Aug 2, 2024
speedie1337 pushed a commit to speedie1337/hologram.nvim that referenced this pull request Aug 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant