summaryrefslogtreecommitdiffstats
path: root/src/ex_docmd.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2022-03-04 17:10:19 +0000
committerBram Moolenaar <Bram@vim.org>2022-03-04 17:10:19 +0000
commit6aca4d3c2bb6b60cdf51b2ab49fbec6b8f88c890 (patch)
tree17d2add584594fb55ccc7c100acaa852d209af37 /src/ex_docmd.c
parentd979d64fa269ff47a96fc6aed2f4cdd066753c0c (diff)
patch 8.2.4503: Vim9: there is no point in supporting :Print and :modev8.2.4503
Problem: Vim9: there is no point in supporting :Print and :mode. Solution: Do not recognize :Print and :mode as commands. (closes #9870)
Diffstat (limited to 'src/ex_docmd.c')
-rw-r--r--src/ex_docmd.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/ex_docmd.c b/src/ex_docmd.c
index 36a7386eb4..287045bc5d 100644
--- 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)