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:
committed by
Christian Brabandt
parent
6c57c30ad4
commit
b7f19a5459
@@ -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,
|
||||
|
@@ -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
|
||||
|
@@ -704,6 +704,8 @@ static char *(features[]) =
|
||||
|
||||
static int included_patches[] =
|
||||
{ /* Add new patch number below this line */
|
||||
/**/
|
||||
966,
|
||||
/**/
|
||||
965,
|
||||
/**/
|
||||
|
Reference in New Issue
Block a user