1 Jun 2011 18:50
Re: HOME variable in cmd.exe for vim compiled in an UNIX-like environment
Fabian Greffrath <fabian <at> greffrath.com>
2011-06-01 16:50:28 GMT
2011-06-01 16:50:28 GMT
Am 31.05.2011 11:16, schrieb Gary Johnson: > Under what conditions does yours crash? Plain vim.exe from MSYS executed in a cmd.exe shell. I have seen something similar to your observations: If I unset HOME in cmd.exe (via "set HOME=") and then run vim.exe from MSYS, it crashes. If I first run bash and then start vim.exe from bash, it works, even if bash also has its HOME variable unset. Strange... However, currently the init_homedir function in misc1.c does not consider the case when both UNIX is defined at build time (#ifdef UNIX) but (var == NULL) at run time, which is perfectly possible when vim is compiled in an MSYS environment (which has __unix defined) but executed from a cmd.exe shell without a HOME variable. The attached short patch is very pragmatic but at least provides a fallback solution when the aforementioned case occures, else the init_homedir function may return and the homedir variable is still NULL. Cheers, - Fabian -- --- misc1.c.orig +++ misc1.c <at> <at> -3540,6 +3540,8 <at> <at> } #endif(Continue reading)
RSS Feed