File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2343,7 +2343,7 @@ do_one_cmd(
23432343 vim_free (p );
23442344 /* If the autocommands did something and didn't cause an error, try
23452345 * finding the command again. */
2346- p = (ret && !aborting ()) ? find_command (& ea , NULL ) : NULL ;
2346+ p = (ret && !aborting ()) ? find_command (& ea , NULL ) : ea . cmd ;
23472347 }
23482348#endif
23492349
Original file line number Diff line number Diff line change @@ -46,3 +46,33 @@ function Test_cmdmods()
4646 delcommand MyQCmd
4747 unlet g: mods
4848endfunction
49+
50+ func Test_Ambiguous ()
51+ command Doit let g: didit = ' yes'
52+ command Dothat let g: didthat = ' also'
53+ call assert_fails (' Do' , ' E464:' )
54+ Doit
55+ call assert_equal (' yes' , g: didit )
56+ Dothat
57+ call assert_equal (' also' , g: didthat )
58+ unlet g: didit
59+ unlet g: didthat
60+
61+ delcommand Doit
62+ Do
63+ call assert_equal (' also' , g: didthat )
64+ delcommand Dothat
65+ endfunc
66+
67+ func Test_CmdUndefined ()
68+ call assert_fails (' Doit' , ' E492:' )
69+ au CmdUndefined Doit :command Doit let g: didit = ' yes'
70+ Doit
71+ call assert_equal (' yes' , g: didit )
72+ delcommand Doit
73+
74+ call assert_fails (' Dothat' , ' E492:' )
75+ au CmdUndefined * let g: didnot = ' yes'
76+ call assert_fails (' Dothat' , ' E492:' )
77+ call assert_equal (' yes' , g: didnot )
78+ endfunc
Original file line number Diff line number Diff line change @@ -758,6 +758,8 @@ static char *(features[]) =
758758
759759static int included_patches [] =
760760{ /* Add new patch number below this line */
761+ /**/
762+ 2110 ,
761763/**/
762764 2109 ,
763765/**/
You can’t perform that action at this time.
0 commit comments