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)
diff --git a/src/misc1.c b/src/misc1.c
index f0e629b..ab5f6f7 100644
--- a/src/misc1.c
+++ b/src/misc1.c
@@ -4908,7 +4908,7 @@
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]))