diff options
Diffstat (limited to 'src/nvim/ex_cmds.c')
-rw-r--r-- | src/nvim/ex_cmds.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/nvim/ex_cmds.c b/src/nvim/ex_cmds.c index 824cc125f4..b4adef9235 100644 --- a/src/nvim/ex_cmds.c +++ b/src/nvim/ex_cmds.c @@ -1658,9 +1658,9 @@ static char_u *viminfo_filename(char_u *file) file = use_viminfo; else if ((file = find_viminfo_parameter('n')) == NULL || *file == NUL) { #ifdef VIMINFO_FILE2 - /* don't use $HOME when not defined (turned into "c:/"!). */ - if (os_getenv((char_u *)"HOME") == NULL) { - /* don't use $VIM when not available. */ + // don't use $HOME when not defined (turned into "c:/"!). + if (!os_env_exists("HOME")) { + // don't use $VIM when not available. expand_env((char_u *)"$VIM", NameBuff, MAXPATHL); if (STRCMP("$VIM", NameBuff) != 0) /* $VIM was expanded */ file = (char_u *)VIMINFO_FILE2; |