diff options
Diffstat (limited to 'src/eval.c')
-rw-r--r-- | src/eval.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/eval.c b/src/eval.c index ef25a3fc9d..6034cd24f7 100644 --- a/src/eval.c +++ b/src/eval.c @@ -9690,11 +9690,12 @@ shortpath_for_partial( */ int modify_fname( - char_u *src, /* string with modifiers */ - int *usedlen, /* characters after src that are used */ - char_u **fnamep, /* file name so far */ - char_u **bufp, /* buffer for allocated file name or NULL */ - int *fnamelen) /* length of fnamep */ + char_u *src, // string with modifiers + int tilde_file, // "~" is a file name, not $HOME + int *usedlen, // characters after src that are used + char_u **fnamep, // file name so far + char_u **bufp, // buffer for allocated file name or NULL + int *fnamelen) // length of fnamep { int valid = 0; char_u *tail; @@ -9724,8 +9725,8 @@ repeat: || (*fnamep)[1] == '\\' # endif || (*fnamep)[1] == NUL) - #endif + && !(tilde_file && (*fnamep)[1] == NUL) ) { *fnamep = expand_env_save(*fnamep); |