-
Notifications
You must be signed in to change notification settings - Fork 37
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
"Invalid buffer id: 1" error when buffer loaded from last session #50
Comments
@uloco I've seen this sort of error from autosession before and other neovim plugins and IIRC these manifested through the first plugin loaded but weren't actually due to it. In your specific case an autocommand is being called with a buffer but when this plugin gets to using this buffer (inside the handler for the autocommand) it isn't valid. This is really fishy since the buffer passed to the autocommand should definitely exist unless some plugin is doing something unexpected, it's not normal to have to guard against the buffer passed to an autocommand still existing by the time the callback is called. |
I'll investigate further but as I said it doesn't happen with v1.0.0 so I rolled back for now. It is definitely a change you introduced. Probably session management plugin is doing something weird too. On latest tag it happens on every start. |
@uloco what I've tried to explain is that yes this plugin made changes between v1.0.0 and v1.1.0 but the changes are not those that I should then need further work arounds for. One of the plugins you are using is causing a race condition that these changes only just now exposed. I've added in a sanity check which may or may not be enough, but is the most reasonable thing I can do without adding hacks around another plugins behaviour. I also have a session restoration plugin I use with this plugin but it doesn't cause any issues with this plugin |
@akinsho Your last commit fixed the error at least :) Thanks. |
Great to hear 👍🏾, I use https://github.com/olimorris/persisted.nvim, which has been pretty nice |
I get the following error, when a buffer is already open when starting ( restored from 'rmagatti/auto-session' )
This does not happen with version v1.0.0
The text was updated successfully, but these errors were encountered: