From 9132426334a8c7e159db93ec1b08ed61ac600aae Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Fri, 9 Sep 2022 13:27:59 +0100 Subject: patch 9.0.0423: "for" and "while" not recognized after :vim9cmd and :legacy Problem: "for" and "while" not recognized after :vim9cmd and :legacy. (Emanuele Torre) Solution: Recognize all the command modifiers. (closes #11087) Add a test to check the list of modifiers. --- src/ex_docmd.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/ex_docmd.c') diff --git a/src/ex_docmd.c b/src/ex_docmd.c index 0b6b217121..0024c99c63 100644 --- a/src/ex_docmd.c +++ b/src/ex_docmd.c @@ -2888,7 +2888,7 @@ parse_command_modifiers( switch (*p) { - // When adding an entry, also modify cmd_exists(). + // When adding an entry, also modify cmdmods[]. case 'a': if (!checkforcmd_noparen(&eap->cmd, "aboveleft", 3)) break; cmod->cmod_split |= WSP_ABOVE; @@ -3958,11 +3958,13 @@ static struct cmdmod {"confirm", 4, FALSE}, {"filter", 4, FALSE}, {"hide", 3, FALSE}, + {"horizontal", 3, FALSE}, {"keepalt", 5, FALSE}, {"keepjumps", 5, FALSE}, {"keepmarks", 3, FALSE}, {"keeppatterns", 5, FALSE}, {"leftabove", 5, FALSE}, + {"legacy", 3, FALSE}, {"lockmarks", 3, FALSE}, {"noautocmd", 3, FALSE}, {"noswapfile", 3, FALSE}, @@ -3974,6 +3976,7 @@ static struct cmdmod {"unsilent", 3, FALSE}, {"verbose", 4, TRUE}, {"vertical", 4, FALSE}, + {"vim9cmd", 4, FALSE}, }; /* -- cgit v1.2.3