diff options
author | Albert Liu <albertymliu@gmail.com> | 2021-08-27 20:59:35 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2021-08-27 20:59:35 +0200 |
commit | 6024c0427ce1196344439997d5e41a6f8546368c (patch) | |
tree | 5671e333659a598c6338e804135785b40653c7a4 /src/cmdexpand.c | |
parent | 47016f57724d3970c54f4ca1f392dff39d3fecae (diff) | |
download | vim-git-6024c0427ce1196344439997d5e41a6f8546368c.tar.gz |
patch 8.2.3378: MS-Windows: completing environment variables with % is wrongv8.2.3378
Problem: MS-Windows: completing environment variables with % is wrong.
Solution: Only complete environment variables with $. (Albert Liu,
closes #8791)
Diffstat (limited to 'src/cmdexpand.c')
-rw-r--r-- | src/cmdexpand.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/src/cmdexpand.c b/src/cmdexpand.c index 27fda7866..58ba75967 100644 --- a/src/cmdexpand.c +++ b/src/cmdexpand.c @@ -1277,12 +1277,8 @@ set_one_cmd_context( xp->xp_context = EXPAND_SHELLCMD; } - // Check for environment variable - if (*xp->xp_pattern == '$' -#if defined(MSWIN) - || *xp->xp_pattern == '%' -#endif - ) + // Check for environment variable. + if (*xp->xp_pattern == '$') { for (p = xp->xp_pattern + 1; *p != NUL; ++p) if (!vim_isIDc(*p)) @@ -1296,7 +1292,7 @@ set_one_cmd_context( compl = EXPAND_ENV_VARS; } } - // Check for user names + // Check for user names. if (*xp->xp_pattern == '~') { for (p = xp->xp_pattern + 1; *p != NUL && *p != '/'; ++p) |