Mercurial > vim
diff src/ex_docmd.c @ 30174:3564cddda2a5 v9.0.0423
patch 9.0.0423: "for" and "while" not recognized after :vim9cmd and :legacy
Commit: https://github.com/vim/vim/commit/9132426334a8c7e159db93ec1b08ed61ac600aae
Author: Bram Moolenaar <Bram@vim.org>
Date: Fri Sep 9 13:27:59 2022 +0100
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.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Fri, 09 Sep 2022 14:30:05 +0200 |
parents | 8dd2c2db00d2 |
children | e0cb5fb44859 |
line wrap: on
line diff
--- 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}, }; /*