-
Notifications
You must be signed in to change notification settings - Fork 15
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 #395
Comments
A very rough solution is the following function GitBuffer:is_inside_git_dir()
if vim.bo.buftype ~= '' then return end
return git_repo.exists(self:get_name())
end I haven't seen any side-effects locally, but this might just cover my own specific case and there might be other edge cases that I fail to think of. |
Another thing I noticed is that when enabling your plugin, I cannot record macros any more. If I disable your plugin, I'm able to record macros. I preferred to not open a separate issue for this, but if it's easier for you then I will happily create a new one. |
I was wrong about the macro recording. It's because I have the following in my configuration scene = {
diff_preference = "unified", -- unified or split
keymaps = {
quit = "q",
},
}, But without it the windows do not close with just pressing |
Thanks for surfacing these issues. I will target patches for them soon. The macro thing is still an issue imo as I will try to create a solution in which this can should never happen (should should still be able to assign it to |
The default should be |
Yes, but that still doesn't work in my case because of the global mapping effect. I use |
Yup I hear you, your concerns will be addressed by #397. |
Thank you for your prompt response. Can confirm both issues are solved. I haven't tested extensively yet, but if I come across some other edge case, I will let you know. Your plugin looks awesome by the way!! I hope it becomes more widespread across the Neovim community. I'm thankful I came across your Reddit post when you did 😄 |
Description
I use a dashboard in my Neovim configuration. Some times (not always) when I open Neovim with just
nvim
and the dashboard appears, if I presss
to restore session (I usepersistence.nvim
for session management), then I get the following errorOn the same note, I use
snacks.picker
as my fuzzy picker and it also uses aprompt
buffer to implement its input field. I get the same error with a different buffer id there as well. I believe some kind of check should be done on which buffersvgit.nvim
should attach.In my personal opinion, a sane check would be to not try and get the bufnames of buffers that are of
buftype
: "prompt" and "nofile". Or maybe it could check to only try and get the bufnames from buffers that havebuftype = ""
(normal buffers). No idea if my assumption is actually correct and if it has some other potential side-effects. I'm sure you would know better.The text was updated successfully, but these errors were encountered: