OXY2DEV / markview.nvim

☄️ Highly customisable markdown(latex & inline html) previewer for Neovim
Apache License 2.0
1.41k stars 39 forks source link

🐞 Bug: Invalid buffer id #175

Open windowsrefund opened 3 weeks ago

windowsrefund commented 3 weeks ago

Before reporting:

Problem:

This may be somewhat tricky as the issue comes up when using :GpChatDelete from the gp.nvim plugin. That said, I'll do my best to provide the sequence of events leading up to this error:

Error executing vim.schedule lua callback: ....local/share/nvim/lazy/markview.nvim/plugin/markview.lua:128: Invalid buffer id: 18
stack traceback:
        [C]: in function '__index'
        ....local/share/nvim/lazy/markview.nvim/plugin/markview.lua:128: in function ''
        vim/_editor.lua: in function <vim/_editor.lua:0>

Now we have 2 buffers open; our original and the buffer used by the chat (which renders in markdown)

:ls
 14 #h + "[No Name]"                    line 1
 20 %a   "~/.local/share/nvim/gp/chats/2024-10-10.14-48-17.970.md" line 13

Now delete the chat buffer with :GpChatDelete

Steps to reproduce the issue:

See above

Expected behavior:

I don't know and it may be more appropriate to raise this in the gp.nvim repo. Figured I'd start here based on what's generating the error.

Neovim version:

v0.10.1

johnend commented 6 days ago

I have the same error show when using preview in Oil buffers. If I move the cursor down to a .md file and preview it, and then navigate to another file with preview still open I get a similar error as described above (only when moving away from a previewed file).

image