-
-
Notifications
You must be signed in to change notification settings - Fork 193
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
Gitsigns gives up on a buffer #738
Comments
Not enough information. You haven't even provided the debug messages. |
Yes, I did not provide debug messages. This issue does not happen consistently, and I normally do not run it with debug enabled... I understand that this issue is very difficult to reproduce. But my quesion also was if there is a workaround possible to restore the gitsigns behaviour without restarting neovim? Clearly some internal gitsigns data becomes wrong. I wonder if providing the error message should at least give a clue where it happens, and maybe something can be done to fix inside neovim session it so that the work could continue? |
I would expect closing and opening the buffer again to fix the issue. Perhaps Gitsigns isn't cleaning up the state properly. |
This comment was marked as spam.
This comment was marked as spam.
To recreate this bug This often happens because I dynamically In Unfortunately, restarting |
I think the problem could be in The problem is that if an exception is raised while the function was running, running[id] is never reset, and the function for that buffer can't be called any more. I believe the wrapper should use A workaround is to use |
Good find. The problem is that the function being wrapped is async so pcall won't necessarily work. |
I hope it is still possible to ensure that But if not, maybe it is possible to move the Another solution could be to use timeouts - store the timestamp of the last invocation, and, if the function is "running" for longer than certain amount of time, assume that it is not anymore and proceed. |
Knowing the issue is coming from It may just be the case to make sure the async framework can properly handle pcall which is on my to-do list anyway. |
I am not sure if this is the same issue or a slightly different one, but I am noticing much more cases where gitsigns stops working on a buffer. Like before, it does not happen every time, but multiple times a day.
|
This comment was marked as outdated.
This comment was marked as outdated.
That stacktrace is from a version of gitsigns from at least 5 months a go. Please re-run on the latest. |
This should be fixed by #925 |
Description
Something happens to a buffer, and gitsigns is unable to work with it any more. Other buffers are ok, but not this particular one. There could be several such buffers at a time.
Closing the window or even deleting the buffer with
:bdel
doesn't help - after the buffer is reopened, the problems continue.If the fix is not awailable, I would like to be able to resolve this issue without restarting neovim at least - I have so many buffers and terminal windows open. Is it possible to restart/reset gitsigns without reopening neovim?
Neovim version
NVIM v0.9.0-dev-650+g870ca1de5 Build type: Release LuaJIT 2.1.0-beta3
Operating system and version
Red Hat Enterprise Linux Server 7.9 (Maipo)
Expected behavior
Gitsigns works as usual with a buffer. Displays hints in a gutter, jumps between hunks, etc...
Actual behavior
Nothing is displayed in a gutter.
When I try jumping between diffs, I get this:
Minimal config
Steps to reproduce
Not sure. This happens rarely and inconsistently.
My guess would be that background git operations could be responsible somehow. I think the problems started when I did some command-line rebasing of the code opened in neovim buffers.
Gitsigns debug messages
No response
The text was updated successfully, but these errors were encountered: