1
0
forked from aniani/vim

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>
This commit is contained in:
h-east
2024-12-27 16:25:32 +01:00
committed by Christian Brabandt
parent 6c57c30ad4
commit b7f19a5459
3 changed files with 11 additions and 1 deletions

View File

@@ -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