Mercurial > vim
diff src/ex_docmd.c @ 27956:2485bf68de34 v8.2.4503
patch 8.2.4503: Vim9: there is no point in supporting :Print and :mode
Commit: https://github.com/vim/vim/commit/6aca4d3c2bb6b60cdf51b2ab49fbec6b8f88c890
Author: Bram Moolenaar <Bram@vim.org>
Date: Fri Mar 4 17:10:19 2022 +0000
patch 8.2.4503: Vim9: there is no point in supporting :Print and :mode
Problem: Vim9: there is no point in supporting :Print and :mode.
Solution: Do not recognize :Print and :mode as commands. (closes https://github.com/vim/vim/issues/9870)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Fri, 04 Mar 2022 18:15:03 +0100 |
parents | 6e5d378919c4 |
children | 212c5894b8b1 |
line wrap: on
line diff
--- a/src/ex_docmd.c +++ b/src/ex_docmd.c @@ -3752,6 +3752,10 @@ find_ex_command( break; } + // :Print and :mode are not supported in Vim9 script + if (vim9 && (eap->cmdidx == CMD_mode || eap->cmdidx == CMD_Print)) + eap->cmdidx = CMD_SIZE; + // Do not recognize ":*" as the star command unless '*' is in // 'cpoptions'. if (eap->cmdidx == CMD_star && vim_strchr(p_cpo, CPO_STAR) == NULL)