-
Notifications
You must be signed in to change notification settings - Fork 95
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
Vim hangs when opening from gitu on Windows #186
Comments
Hi! Was just a matter of time before this would happen I feel, the implementation is not ideal. It seems that Gitu is unable to realize we're actually opening Vim due to the If you try opening a file like Got the idea of checking the output of The existing code is found here: Lines 67 to 103 in 9d9ea52
Happy you like it! :) |
e.g. run `nano --version` and inspect the output closes: #186
Cool! If I have some extra free time this week I can test it out, thanks for taking a look |
Ok, I managed to get a debugger set up and stepped through the code in the new branch. It doesn't look like the changes you made in show.rs are ever getting hit; with the editor set to vim, it gets as far as the function "run_cmd_interactive" in state.rs, where it hangs as as soon as vim spawns. I tried setting it to nano, and while it works fine from the shell it spits out an error code when gitu tries to open it. Sorry I don't know the first thing about rust, I'm not sure how helpful this is! (I took a screen capture of this but it's too large to upload. If you think that would be helpful I can zip it up or something). |
Interesting! I'm not sure what's going on. Else I'd double-check the environment variables: Screenshot would be helpful, or (if it's just text), I guess you could copy-paste it? And some notes for myself/others that happen to read this: |
I mean the error :) Do you have the error code that you saw? |
Oh, right, sorry! It just comes back with "! exited with code: 1". Potentially related to this newer issue? #215 Edit: Vim actually briefly complains when it hangs with a similar message that I just noticed: "Warning: Input is not from a terminal". |
When opening vim from gitu (when committing, for instance) on windows, the editor does not respond to keystrokes. The graphical version of vim seems to work just fine. Not sure if this is a gitu issue or not, but vim works fine in other scenarios. I've tried setting the editor variable in both git config and the system environment variables to see if that makes a difference, and have tried removing my vimrc to see if there was a problem there, but it didn't change the behavior. The issue also appears in both cmd and windows terminal running powershell core. The editor variable is set to "C:/Tools/Vim/vim91/vim.exe".
Any thoughts?
Thanks for the very cool utility!
The text was updated successfully, but these errors were encountered: