mirror of
https://github.com/vim/vim.git
synced 2025-09-23 03:43:49 -04:00
patch 8.2.3378: MS-Windows: completing environment variables with % is wrong
Problem: MS-Windows: completing environment variables with % is wrong. Solution: Only complete environment variables with $. (Albert Liu, closes #8791)
This commit is contained in:
committed by
Bram Moolenaar
parent
47016f5772
commit
6024c0427c
@@ -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)
|
||||
|
Reference in New Issue
Block a user