mirror of
https://github.com/vim/vim.git
synced 2025-09-29 04:34:16 -04:00
patch 8.2.2511: Vim9: cannot use Vim9 script syntax in some places
Problem: Vim9: cannot use Vim9 script syntax in some places. Solution: Add the :vim9cmd command modifier. Incompatible: Makes ":vim9" mean ":vim9cmd" instead of ":vim9script".
This commit is contained in:
@@ -1737,7 +1737,7 @@ do_one_cmd(
|
||||
int starts_with_colon = FALSE;
|
||||
#ifdef FEAT_EVAL
|
||||
int may_have_range;
|
||||
int vim9script = in_vim9script();
|
||||
int vim9script;
|
||||
int did_set_expr_line = FALSE;
|
||||
#endif
|
||||
int sourcing = flags & DOCMD_VERBOSE;
|
||||
@@ -1785,7 +1785,7 @@ do_one_cmd(
|
||||
if (parse_command_modifiers(&ea, &errormsg, &cmdmod, FALSE) == FAIL)
|
||||
goto doend;
|
||||
apply_cmdmod(&cmdmod);
|
||||
|
||||
vim9script = in_vim9script();
|
||||
after_modifier = ea.cmd;
|
||||
|
||||
#ifdef FEAT_EVAL
|
||||
@@ -2933,6 +2933,17 @@ parse_command_modifiers(
|
||||
cmod->cmod_split |= WSP_VERT;
|
||||
continue;
|
||||
}
|
||||
if (checkforcmd(&eap->cmd, "vim9cmd", 4))
|
||||
{
|
||||
if (ends_excmd2(p, eap->cmd))
|
||||
{
|
||||
*errormsg =
|
||||
_(e_vim9cmd_must_be_followed_by_command);
|
||||
return FAIL;
|
||||
}
|
||||
cmod->cmod_flags |= CMOD_VIM9CMD;
|
||||
continue;
|
||||
}
|
||||
if (!checkforcmd(&p, "verbose", 4))
|
||||
break;
|
||||
if (vim_isdigit(*eap->cmd))
|
||||
|
Reference in New Issue
Block a user