0
0
mirror of https://github.com/vim/vim.git synced 2025-09-23 03:43:49 -04:00

patch 8.2.0640: Vim9: expanding does not work

Problem:    Vim9: expanding  does not work.
Solution:   Find wildcards in not compiled commands.  Reorganize test files.
This commit is contained in:
Bram Moolenaar
2020-04-25 20:02:55 +02:00
parent 49b2fb36ca
commit cfe435d7fe
11 changed files with 373 additions and 214 deletions

View File

@@ -648,6 +648,45 @@ call_def_function(
do_cmdline_cmd(iptr->isn_arg.string);
break;
// execute Ex command from pieces on the stack
case ISN_EXECCONCAT:
{
int count = iptr->isn_arg.number;
int len = 0;
int pass;
int i;
char_u *cmd = NULL;
char_u *str;
for (pass = 1; pass <= 2; ++pass)
{
for (i = 0; i < count; ++i)
{
tv = STACK_TV_BOT(i - count);
str = tv->vval.v_string;
if (str != NULL && *str != NUL)
{
if (pass == 2)
STRCPY(cmd + len, str);
len += STRLEN(str);
}
if (pass == 2)
clear_tv(tv);
}
if (pass == 1)
{
cmd = alloc(len + 1);
if (cmd == NULL)
goto failed;
len = 0;
}
}
do_cmdline_cmd(cmd);
vim_free(cmd);
}
break;
// execute :echo {string} ...
case ISN_ECHO:
{
@@ -1961,6 +2000,10 @@ ex_disassemble(exarg_T *eap)
case ISN_EXEC:
smsg("%4d EXEC %s", current, iptr->isn_arg.string);
break;
case ISN_EXECCONCAT:
smsg("%4d EXECCONCAT %lld", current,
(long long)iptr->isn_arg.number);
break;
case ISN_ECHO:
{
echo_T *echo = &iptr->isn_arg.echo;