forked from aniani/vim
patch 8.1.0211: expanding a file name "~" results in $HOME
Problem: Expanding a file name "~" results in $HOME. (Aidan Shafran) Solution: Change "~" to "./~" before expanding. (closes #3072)
This commit is contained in:
@@ -4908,7 +4908,7 @@ home_replace(
|
||||
char_u *fbuf = NULL;
|
||||
|
||||
flen = (int)STRLEN(homedir_env);
|
||||
(void)modify_fname((char_u *)":p", &usedlen,
|
||||
(void)modify_fname((char_u *)":p", FALSE, &usedlen,
|
||||
&homedir_env, &fbuf, &flen);
|
||||
flen = (int)STRLEN(homedir_env);
|
||||
if (flen > 0 && vim_ispathsep(homedir_env[flen - 1]))
|
||||
|
Reference in New Issue
Block a user