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.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
diff --git a/src/testdir/test_vim9_enum.vim b/src/testdir/test_vim9_enum.vim
index bc54bee..a5fb26f 100644
--- a/src/testdir/test_vim9_enum.vim
+++ b/src/testdir/test_vim9_enum.vim
@@ -44,6 +44,14 @@
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