1
0
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:
Bram Moolenaar
2018-07-25 21:19:13 +02:00
parent 6f8d2ac6f1
commit 00136dc321
8 changed files with 29 additions and 11 deletions

View File

@@ -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]))