patch 9.1.0966: Vim9: :enum command can be shortened Commit: https://github.com/vim/vim/commit/b7f19a5459273d8a3ff095c1ff5f0a78a960ae6a Author: h-east <h.east....@gmail.com> Date: Fri Dec 27 16:25:32 2024 +0100
patch 9.1.0966: Vim9: :enum command can be shortened Problem: Vim9: :enum command can be shortened Solution: prevent shortening of :enum command by adding the EX_WHOLE flag to command definition (h-east) closes: #16305 Signed-off-by: h-east <h.east....@gmail.com> Signed-off-by: Christian Brabandt <c...@256bit.org> diff --git a/src/ex_cmds.h b/src/ex_cmds.h index dc5da0a1e..92a40f20a 100644 --- a/src/ex_cmds.h +++ b/src/ex_cmds.h @@ -597,7 +597,7 @@ EXCMD(CMD_enew, "enew", ex_edit, EX_BANG|EX_TRLBAR, ADDR_NONE), EXCMD(CMD_enum, "enum", ex_class, - EX_EXTRA|EX_CMDWIN|EX_LOCK_OK|EX_EXPORT, + EX_EXTRA|EX_CMDWIN|EX_LOCK_OK|EX_WHOLE|EX_EXPORT, ADDR_NONE), EXCMD(CMD_eval, "eval", ex_eval, EX_EXTRA|EX_NOTRLCOM|EX_EXPR_ARG|EX_SBOXOK|EX_CMDWIN|EX_LOCK_OK, diff --git a/src/testdir/test_vim9_enum.vim b/src/testdir/test_vim9_enum.vim index bc54bee3a..a5fb26fcf 100644 --- a/src/testdir/test_vim9_enum.vim +++ b/src/testdir/test_vim9_enum.vim @@ -44,6 +44,14 @@ def Test_enum_parse() END v9.CheckSourceFailure(lines, 'E492: Not an editor command: enums Something', 2) + # The complete "enum" should be specified. + lines =<< trim END + vim9script + enu Something + endenum + END + v9.CheckSourceFailure(lines, 'E1065: Command cannot be shortened: enu', 2) + # The complete "endenum" should be specified. lines =<< trim END vim9script diff --git a/src/version.c b/src/version.c index 622a0a1c6..8b9036538 100644 --- a/src/version.c +++ b/src/version.c @@ -704,6 +704,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 966, /**/ 965, /**/ -- -- You received this message from the "vim_dev" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscr...@googlegroups.com. To view this discussion visit https://groups.google.com/d/msgid/vim_dev/E1tRCHs-007Ram-NW%40256bit.org.