-
Notifications
You must be signed in to change notification settings - Fork 219
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
Showing a diff sometimes crashes vim on windows #7
Comments
@bfredl do you know what could cause this? I can sometimes reproduce this 100% (when certain conditions are met, which I don't know yet) on windows, but never on linux. Doing I can record a video for you if this could help you. |
To me, on linux, it gives me a segfault if I enable diff 3/4 when I have something staged. I'm not sure it's the same issue, but definitely it looks like so. |
Can you reproduce this with a different repo? For me this is happening completely random and I don't know what the problem is. |
It happened to me on three different repos, one being this, one being my dotfiles and another is a java codebase. Completely different repos. |
Is it always the same position (like 4th staged change or something like that)? For me it has happend when only 1 file was unstaged or when I had a lot of files open. |
1 or more staged, sometimes not even staged, but I guess it's probably something else. Im assuming it's on gits side, when getting the patches, rather than on displaying... |
It has to do something with |
Modified lua/neogit/status.lua
@@ -59,7 +59,7 @@ local function insert_diff(section, change)
return
end
- vim.cmd("normal zd")
+ --vim.cmd("normal zd")
if not change.diff_content then
if section.name == "staged_changes" then Ok, I've isolated it to this line. When I comment this command, it never breaks for me. |
I don't know the intent of this |
Edit: I think we need |
I found that by accident by manually running
Unfortunately no. Another alternative would be to test without the shorthand version |
I just tested without the |
Manually doing the |
Ok, so maybe we're having different issues on Windows and Linux :/ |
which neovim version are you using? |
I've been using master, latest build from today. |
@hkupty are you still encountering the issue? I haven't had this bug in a while and thinking about closing this issue. |
Been using for a while, didn't seem to happen anymore. I guess it should be safe to close it, sorry for the delay in answering. |
This is probably an upstream bug. Sometimes toggling a diff for the first time can crash neovim when creating the fold
The text was updated successfully, but these errors were encountered: