Mercurial > vim
comparison 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 |
comparison
equal
deleted
inserted
replaced
30173:6806e2884fad | 30174:3564cddda2a5 |
---|---|
2886 break; | 2886 break; |
2887 } | 2887 } |
2888 | 2888 |
2889 switch (*p) | 2889 switch (*p) |
2890 { | 2890 { |
2891 // When adding an entry, also modify cmd_exists(). | 2891 // When adding an entry, also modify cmdmods[]. |
2892 case 'a': if (!checkforcmd_noparen(&eap->cmd, "aboveleft", 3)) | 2892 case 'a': if (!checkforcmd_noparen(&eap->cmd, "aboveleft", 3)) |
2893 break; | 2893 break; |
2894 cmod->cmod_split |= WSP_ABOVE; | 2894 cmod->cmod_split |= WSP_ABOVE; |
2895 continue; | 2895 continue; |
2896 | 2896 |
3956 {"botright", 2, FALSE}, | 3956 {"botright", 2, FALSE}, |
3957 {"browse", 3, FALSE}, | 3957 {"browse", 3, FALSE}, |
3958 {"confirm", 4, FALSE}, | 3958 {"confirm", 4, FALSE}, |
3959 {"filter", 4, FALSE}, | 3959 {"filter", 4, FALSE}, |
3960 {"hide", 3, FALSE}, | 3960 {"hide", 3, FALSE}, |
3961 {"horizontal", 3, FALSE}, | |
3961 {"keepalt", 5, FALSE}, | 3962 {"keepalt", 5, FALSE}, |
3962 {"keepjumps", 5, FALSE}, | 3963 {"keepjumps", 5, FALSE}, |
3963 {"keepmarks", 3, FALSE}, | 3964 {"keepmarks", 3, FALSE}, |
3964 {"keeppatterns", 5, FALSE}, | 3965 {"keeppatterns", 5, FALSE}, |
3965 {"leftabove", 5, FALSE}, | 3966 {"leftabove", 5, FALSE}, |
3967 {"legacy", 3, FALSE}, | |
3966 {"lockmarks", 3, FALSE}, | 3968 {"lockmarks", 3, FALSE}, |
3967 {"noautocmd", 3, FALSE}, | 3969 {"noautocmd", 3, FALSE}, |
3968 {"noswapfile", 3, FALSE}, | 3970 {"noswapfile", 3, FALSE}, |
3969 {"rightbelow", 6, FALSE}, | 3971 {"rightbelow", 6, FALSE}, |
3970 {"sandbox", 3, FALSE}, | 3972 {"sandbox", 3, FALSE}, |
3972 {"tab", 3, TRUE}, | 3974 {"tab", 3, TRUE}, |
3973 {"topleft", 2, FALSE}, | 3975 {"topleft", 2, FALSE}, |
3974 {"unsilent", 3, FALSE}, | 3976 {"unsilent", 3, FALSE}, |
3975 {"verbose", 4, TRUE}, | 3977 {"verbose", 4, TRUE}, |
3976 {"vertical", 4, FALSE}, | 3978 {"vertical", 4, FALSE}, |
3979 {"vim9cmd", 4, FALSE}, | |
3977 }; | 3980 }; |
3978 | 3981 |
3979 /* | 3982 /* |
3980 * Return length of a command modifier (including optional count). | 3983 * Return length of a command modifier (including optional count). |
3981 * Return zero when it's not a modifier. | 3984 * Return zero when it's not a modifier. |