mirror of
https://github.com/vim/vim.git
synced 2025-09-24 03:44:06 -04:00
patch 8.2.0641: Vim9: not expanded in :hardcopy and syn-include
Problem: Vim9: not expanded in :hardcopy and "syntax include". Solution: Add the EX_EXPAND flag. Expend "syntax include".
This commit is contained in:
@@ -5821,14 +5821,23 @@ compile_mult_expr(char_u *arg, int cmdidx, cctx_T *cctx)
|
||||
static char_u *
|
||||
compile_exec(char_u *line, exarg_T *eap, cctx_T *cctx)
|
||||
{
|
||||
char_u *p;
|
||||
char_u *p;
|
||||
int has_expr;
|
||||
|
||||
if (cctx->ctx_skip == TRUE)
|
||||
goto theend;
|
||||
|
||||
has_expr = (excmd_get_argt(eap->cmdidx) & (EX_XFILE | EX_EXPAND));
|
||||
if (eap->cmdidx == CMD_syntax && STRNCMP(eap->arg, "include ", 8) == 0)
|
||||
{
|
||||
// expand filename in "syntax include [@group] filename"
|
||||
has_expr = TRUE;
|
||||
eap->arg = skipwhite(eap->arg + 7);
|
||||
if (*eap->arg == '@')
|
||||
eap->arg = skiptowhite(eap->arg);
|
||||
}
|
||||
|
||||
if ((excmd_get_argt(eap->cmdidx) & EX_XFILE)
|
||||
&& (p = (char_u *)strstr((char *)eap->arg, "`=")) != NULL)
|
||||
if (has_expr && (p = (char_u *)strstr((char *)eap->arg, "`=")) != NULL)
|
||||
{
|
||||
int count = 0;
|
||||
char_u *start = skipwhite(line);
|
||||
|
Reference in New Issue
Block a user