comparison src/vim9compile.c @ 26358:80b555c4aed0 v8.2.3710

patch 8.2.3710: Vim9: backtick expression expanded for :global Commit: https://github.com/vim/vim/commit/3d2e031d4f0e1559e4a4f99de5eb2330f38f8eb5 Author: Bram Moolenaar <Bram@vim.org> Date: Wed Dec 1 09:27:20 2021 +0000 patch 8.2.3710: Vim9: backtick expression expanded for :global Problem: Vim9: backtick expression expanded for :global. Solution: Check the following command.
author Bram Moolenaar <Bram@vim.org>
date Wed, 01 Dec 2021 10:30:06 +0100
parents 0884f2be6c2a
children a5dac0a9aa5f
comparison
equal deleted inserted replaced
26357:058ce5b5b367 26358:80b555c4aed0
9068 char_u *line = line_arg; 9068 char_u *line = line_arg;
9069 char_u *p; 9069 char_u *p;
9070 int has_expr = FALSE; 9070 int has_expr = FALSE;
9071 char_u *nextcmd = (char_u *)""; 9071 char_u *nextcmd = (char_u *)"";
9072 char_u *tofree = NULL; 9072 char_u *tofree = NULL;
9073 char_u *cmd_arg = NULL;
9073 9074
9074 if (cctx->ctx_skip == SKIP_YES) 9075 if (cctx->ctx_skip == SKIP_YES)
9075 goto theend; 9076 goto theend;
9076 9077
9077 // If there was a prececing command modifier, drop it and include it in the 9078 // If there was a prececing command modifier, drop it and include it in the
9170 { 9171 {
9171 int delim = *eap->arg; 9172 int delim = *eap->arg;
9172 9173
9173 p = skip_regexp_ex(eap->arg + 1, delim, TRUE, NULL, NULL, NULL); 9174 p = skip_regexp_ex(eap->arg + 1, delim, TRUE, NULL, NULL, NULL);
9174 if (*p == delim) 9175 if (*p == delim)
9175 { 9176 cmd_arg = p + 1;
9176 eap->arg = p + 1;
9177 has_expr = TRUE;
9178 }
9179 } 9177 }
9180 9178
9181 if (eap->cmdidx == CMD_folddoopen || eap->cmdidx == CMD_folddoclosed) 9179 if (eap->cmdidx == CMD_folddoopen || eap->cmdidx == CMD_folddoclosed)
9180 cmd_arg = eap->arg;
9181
9182 if (cmd_arg != NULL)
9182 { 9183 {
9183 exarg_T nea; 9184 exarg_T nea;
9184 9185
9185 CLEAR_FIELD(nea); 9186 CLEAR_FIELD(nea);
9186 nea.cmd = eap->arg; 9187 nea.cmd = cmd_arg;
9187 p = find_ex_command(&nea, NULL, lookup_scriptitem, NULL); 9188 p = find_ex_command(&nea, NULL, lookup_scriptitem, NULL);
9188 if (nea.cmdidx <= CMD_SIZE) 9189 if (nea.cmdidx < CMD_SIZE)
9189 { 9190 {
9190 has_expr = excmd_get_argt(nea.cmdidx) & (EX_XFILE | EX_EXPAND); 9191 has_expr = excmd_get_argt(nea.cmdidx) & (EX_XFILE | EX_EXPAND);
9191 if (has_expr) 9192 if (has_expr)
9192 eap->arg = skiptowhite(eap->arg); 9193 eap->arg = skiptowhite(eap->arg);
9193 } 9194 }