diff options
author | zeertzjq <zeertzjq@outlook.com> | 2022-02-07 06:48:10 +0800 |
---|---|---|
committer | zeertzjq <zeertzjq@outlook.com> | 2022-02-07 06:48:10 +0800 |
commit | 53e4434c722d94f9c49dee2fd787d05d36a46bf3 (patch) | |
tree | 81cffc13e5ffad94d11ca93ac007801061fdb1f1 /src/nvim/eval.c | |
parent | f47ba10636b498430fc8d2d490e5bdf6b4e01033 (diff) | |
download | rneovim-53e4434c722d94f9c49dee2fd787d05d36a46bf3.tar.gz rneovim-53e4434c722d94f9c49dee2fd787d05d36a46bf3.tar.bz2 rneovim-53e4434c722d94f9c49dee2fd787d05d36a46bf3.zip |
vim-patch:8.2.0942: expanding to local dir after homedir keeps "~/"
Problem: Expanding to local dir after homedir keeps "~/".
Solution: Adjust modify_fname(). (Christian Brabandt, closes vim/vim#6205,
closes vim/vim#5979)
https://github.com/vim/vim/commit/0e390f40e944036fb558a63b91238cfda128d95f
Diffstat (limited to 'src/nvim/eval.c')
-rw-r--r-- | src/nvim/eval.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nvim/eval.c b/src/nvim/eval.c index 0fe928beb7..926c385892 100644 --- a/src/nvim/eval.c +++ b/src/nvim/eval.c @@ -10700,7 +10700,7 @@ repeat: pbuf = NULL; // Need full path first (use expand_env() to remove a "~/") if (!has_fullname && !has_homerelative) { - if (c == '.' && **fnamep == '~') { + if ((c == '.' || c == '~') && **fnamep == '~') { p = pbuf = expand_env_save(*fnamep); } else { p = pbuf = (char_u *)FullName_save((char *)*fnamep, FALSE); |