Closed TamaMcGlinn closed 2 years ago
This still happens. (the error message changed to be on line 280, but is otherwise the same)
Reproduction steps:
1) Install startify.vim
2) Start neovim
3) Open a file
4) :MarksListAll
I can also confirm that :b 1
gives "E86: Buffer 1 does not exist". I think you need to actually check if the buffer exists before trying to get information about it.
When you do nvim
without targeting any file, startify's buffer is buffer 1. Any files you open after that start at 2, and buffer 1 is deleted when you do so. If I open nvim somefile
the bug does not reproduce because buffer 1 is somefile.
Looks like vim-startify deletes the initial buffer by setting bufhidden=wipe
, which means that it does not trigger the BufDelete
autocommands set up by this plugin.
As a workaround, you can do the following:
autocmd BufLeave * if &ft == "startify" | exe "lua require'marks'._on_delete()" | endif
I can also confirm that :b 1 gives "E86: Buffer 1 does not exist".
FYI, this is just normal Vim behavior, whenever a buffer is wiped. You can check that the same behavior persists even without this plugin.
Thank you for the workaround.
Could you mark this issue as 'open' again so that I can be notified when the real fix gets implemented?
I'm going to use #34 as the tracking issue for this problem.
I tried
:MarksListAll
:but got:
I guess you are assuming buffers that contain marks are never closed?