Closed cameronr closed 1 month ago
If you want to repro, you can either install a session plugin (e.g. (auto-session)[https://github.com/rmagatti/auto-session]) or you can manually create a session:
threshold
buffersthreshold
buffers:mksession ~/test.vim
:%bw
so you have just a blank buffer:source ~/test.vim
Only happens if the session contains more than
threshold
buffers. The error looks like:The error may not be surfaced to the user (depending on how the session was sourced) but even if it's not shown to the user, the session will not fully restore as a result of the error.
The error happens because nvim may create an empty buffer while restoring the session. It keeps track of that buffer and expects to close it later in the session loading process:
Loading a session sets
g:SessionLoad
so you could check for that before checking the buffers. I'll throw together a PR if that's helpful.