comparison src/vim9compile.c @ 20172:1d84eaed0ec8 v8.2.0641

patch 8.2.0641: Vim9: not expanded in :hardcopy and syn-include Commit: https://github.com/vim/vim/commit/6378c4fef37df05c99e8a43616063b4ddb692876 Author: Bram Moolenaar <Bram@vim.org> Date: Sun Apr 26 13:50:41 2020 +0200 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".
author Bram Moolenaar <Bram@vim.org>
date Sun, 26 Apr 2020 14:00:04 +0200
parents 0612c64a2b87
children 72b437855299
comparison
equal deleted inserted replaced
20171:7e3f60fb4b3f 20172:1d84eaed0ec8
5819 * A command that is not compiled, execute with legacy code. 5819 * A command that is not compiled, execute with legacy code.
5820 */ 5820 */
5821 static char_u * 5821 static char_u *
5822 compile_exec(char_u *line, exarg_T *eap, cctx_T *cctx) 5822 compile_exec(char_u *line, exarg_T *eap, cctx_T *cctx)
5823 { 5823 {
5824 char_u *p; 5824 char_u *p;
5825 int has_expr;
5825 5826
5826 if (cctx->ctx_skip == TRUE) 5827 if (cctx->ctx_skip == TRUE)
5827 goto theend; 5828 goto theend;
5828 5829
5829 5830 has_expr = (excmd_get_argt(eap->cmdidx) & (EX_XFILE | EX_EXPAND));
5830 if ((excmd_get_argt(eap->cmdidx) & EX_XFILE) 5831 if (eap->cmdidx == CMD_syntax && STRNCMP(eap->arg, "include ", 8) == 0)
5831 && (p = (char_u *)strstr((char *)eap->arg, "`=")) != NULL) 5832 {
5833 // expand filename in "syntax include [@group] filename"
5834 has_expr = TRUE;
5835 eap->arg = skipwhite(eap->arg + 7);
5836 if (*eap->arg == '@')
5837 eap->arg = skiptowhite(eap->arg);
5838 }
5839
5840 if (has_expr && (p = (char_u *)strstr((char *)eap->arg, "`=")) != NULL)
5832 { 5841 {
5833 int count = 0; 5842 int count = 0;
5834 char_u *start = skipwhite(line); 5843 char_u *start = skipwhite(line);
5835 5844
5836 // :cmd xxx`=expr1`yyy`=expr2`zzz 5845 // :cmd xxx`=expr1`yyy`=expr2`zzz