-
Notifications
You must be signed in to change notification settings - Fork 3
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
Buffer does not exist: -1 on ToggleMarkbar #3
Comments
Markbar buffer should be created and initialized automatically inside of `MarkbarState#getMarkbarBuffer()` by the time it calls `ui#SetMarkbarBufferSettings`; on the off-chance that `bufexists` is somehow failing inside of `getMarkbarBuffer` but not `SetMarkbarBufferSettings`, add explicit checks for an "uninitialized" markbar buffer value.
I can't reproduce this on my machine, unfortunately (using the provided vimrc, vim 8.1, neovim 0.3.1, on WSL Ubuntu 16.04). The thing that most confuses me is that the exception you saw should be logically impossible: the second-topmost function in the call stack ( Would you mind trying a few things for me, and reporting whether they fixed the issue?
Sorry to see that the plugin isn't behaving; here's hoping that we can get this fixed sharpish! |
OpenMarkbar gives same results.
That's not a lot to go on : / |
Drat. That's a bummer. :( I'll try to work on this again as soon as I'm able, but my university's career fair is coming up, so I won't realistically be able to make any progress at all until (probably) the end of this coming week. Thanks for your help, and for your patience; I'll be in touch soon! |
Tentative fix for #3. Running hypothesis is that `badd` is successfully creating a new buffer for the markbar, but that the following call to `bufnr` can't find it in the buffer list (thereby returning '-1'). Try to circumvent this by creating the markbar buffer using `bufnr`, and using its return value. Also, default-initialize MarkbarView::_markbar_buffer to -2 instead of -1, to differentiate between `badd` failure and `bufnr` failure.
Apologies for the wait; recruiting season and classes took more out of me than I'd anticipated. I think that I've nailed down what the problem might be; could you clone from the |
Opens now! All the calls function as expected, except
Also, conflicts with Ale, when opening markbar on the first-and-only file opened in vim, and on every keypress after that:
Without ale, when trying to open markbar on the first-and-only file opened in vim:
On subsequent calls in the same file
Without ale the error does not persist on every keypress and all works as expected once we open more than one file. Opening markbar on an empty file, only on first call, only in
Behavior differs in vim and nvim in that nvim has Seems like a handful, please don't feel like you should compromise the planned activities |
No worries, dude! We're on break right now, and it's a pleasure and a relief to spend some time working on a personal project instead of stressing about coursework. :) And thanks a bunch for the detailed error messages, they're very helpful! I think I've fixed the |
Confirmed:
Only happens in
Previous Ale errors don't occur. Now, once Markbar has been opened and closed in a session, it errors out on opening files (e.g. with
If Markbar is still open (with ale on) when opening a file, two new errors show up in addition to the above:
These Ale errors don't occur in |
Added a fix that might address the Which isn't to say that I won't work on the ALE errors! I'm just not able to replicate them on my machine, and they're somewhat beyond this issue's original scope, so it would be helpful if you could create another issue with an accompanying minimal Again, thanks so much for your help! You've helped me unearth a few very obscure bugs and errors that I wouldn't have noticed otherwise! |
You're right! I've messed up. The BEAddBuffer bug was from interacting with bufexplorer. At this point it seems getting my hands dirty and actually digging into this is a reasonable course of action, we've done enough ghost debugging as it is. Not being able to reproduce is a pain in the buttocks. Thank you for your time! |
On ToggleMarkbar:
With this .vimrc:
Both on vim & nvim:
💜
The text was updated successfully, but these errors were encountered: