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))
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)
call writefile(['testfile'], 'Xtestfile')
call feedkeys(":e Xtest\t\r", "tx")
call assert_equal('testfile', getline(1))
+
+ " Pressing <Tab> after '%' completes the current file, also on MS-Windows
+ call feedkeys(":e %\t\r", "tx")
+ call assert_equal('e Xtestfile', @:)
call delete('Xtestfile')
endfunc