Nessesarius / mintty

Automatically exported from code.google.com/p/mintty
GNU General Public License v3.0
0 stars 0 forks source link

Running Vim hangs (msysgit) #230

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Start Vim (or a Git command wich uses an editor)

What is the expected output? What do you see instead?
Vim should start normally. Instead Vim hangs with 100% usage on one CPU. The 
shell will wait forever. Only killing the Vim process will help.

What versions of mintty, Cygwin/MSYS, and Windows are you using?
I tried this on mintty 0.9.1 and 0.9.2, msysgit 1.7.3.1 on Windows XP SP3.

I'm using the following shortcut to start the mintty/msysgit environment: 
C:\Programme\Git\bin\mintty.exe --config F:\.minttyrc --title "Git Bash" --icon 
C:\Programme\Git\etc\git.ico --exec C:\Programme\Git\bin\sh.exe --login -i

Original issue reported on code.google.com by koraktor on 27 Oct 2010 at 6:25

GoogleCodeExporter commented 8 years ago
Sorry, I forgot to mention that the usual cmd.exe environment of msysgit works 
flawlessly.

Original comment by koraktor on 27 Oct 2010 at 6:26

GoogleCodeExporter commented 8 years ago
The vim in msysgit is a native Windows program rather than an MSYS one, which 
means it expects to talk to a console rather than to an MSYS/Cygwin pseudo 
terminal device, which is what mintty is based on.

Same thing happens with MSYS rxvt dropped into msysgit (and also when using 
Windows vim from vim.org in any of the non-console terminals in Cygwin). The 
MSYS version of vim of course works fine in either mintty or rxvt.

So I'm afraid this is a particularly unfortunate example of issue 56.

Original comment by andy.koppe on 27 Oct 2010 at 12:19

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
Here's my vi/vim file, replacing the one from git at
C:\Program Files (x86)\Git\bin\vim

#!/bin/sh
# git vim hangs when running under cygwin, so use cygwin vi in that case, 
instead
# git bash does not support regex =~, so use grep
# Mingw32 git saves PATH in ORIGINAL_PATH, & uses /c/ instead of /cygdrive/c/
if echo $PATH $ORIGINAL_PATH | grep -q cygdrive ; then 
    "c:/cygwin64/bin/vi.exe" "$@"
elif echo $PATH | grep -q mingw; then
    # we're not running under cygwin, I hope!
    exec /share/vim/vim74/vim "$@"
else
    echo "Couldn't find cygdrive or mingw in path; running wscite\SciTE"
    "C:\Program Files (x86)\wscite\SciTE.exe" "$@"
fi

Original comment by tallp...@gmail.com on 18 Oct 2014 at 10:46