-
Notifications
You must be signed in to change notification settings - Fork 118
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
<abuf>
is wrong for BufUnload
with hidden buffer
#549
Comments
Looks like a bug. So in the first invocation a wrong buf number is passed, but in the consequent invocations it works correctly. So the autocmd defined by the rplugin is:
Here a But in the first invocation when it is yet to be bootstrapped:
It looks like by the time the actual RPC request is made, the buffer is already gone and hence wrong buffer number is passed. I think this is a bug of neovim core (rplugin provider) rather than pynvim --- probably why node-client also suffers the same error. |
https://github.com/neovim/neovim/blob/master/runtime/autoload/remote/define.vim#L114
this executes |
When I
:bdelete
the scratch buffer, the BufUnload event fires and the callback receives the number of the newly focused buffer (i.e. the same asnvim.current.buffer
, not the scratch buffer) in itsbuffer
argument, from the<abuf>
expansion.IIUC, the BufUnload docs says
<abuf>
should hold the unloading buffer number (here, the scratch buffer). Am I doing something wrong or is that a bug?(This looks a lot like neovim/node-client#58.)
The text was updated successfully, but these errors were encountered: