0
0
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:
Bram Moolenaar
2020-04-26 13:50:41 +02:00
parent cfe435d7fe
commit 6378c4fef3
5 changed files with 44 additions and 4 deletions

View File

@@ -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);