0
0
mirror of https://github.com/vim/vim.git synced 2025-10-02 05:04:20 -04:00

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.
This commit is contained in:
Bram Moolenaar
2022-09-09 13:27:59 +01:00
parent 0dc2fd307f
commit 9132426334
5 changed files with 52 additions and 1 deletions

View File

@@ -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},
};
/*