Permalink
Browse files

patch 8.0.0656: cannot use ! after some user commands

Problem:    Cannot use ! after some user commands.
Solution:   Properly check for existing command. (Higashi Higashi)
  • Loading branch information...
brammool committed Jun 22, 2017
1 parent d6abcd1 commit 6f9a476b2f2f0bb5c50d703ec4fc535ffd5bfe8f
Showing with 13 additions and 1 deletion.
  1. +2 −1 src/ex_docmd.c
  2. +9 −0 src/testdir/test_vimscript.vim
  3. +2 −0 src/version.c
View
@@ -2370,7 +2370,8 @@ do_one_cmd(
goto doend;
}
/* Check for wrong commands. */
if (*p == '!' && ea.cmd[1] == 0151 && ea.cmd[0] == 78)
if (*p == '!' && ea.cmd[1] == 0151 && ea.cmd[0] == 78
&& !IS_USER_CMDIDX(ea.cmdidx))
{
errormsg = uc_fun_cmd();
goto doend;
@@ -1400,6 +1400,15 @@ func Test_delfunction_force()
delfunc! Xtest
endfunc
" Test using bang after user command {{{1
func Test_user_command_with_bang()
command -bang Nieuw let nieuw = 1
Ni!
call assert_equal(1, nieuw)
unlet nieuw
delcommand Nieuw
endfunc
"-------------------------------------------------------------------------------
" Modelines {{{1
" vim: ts=8 sw=4 tw=80 fdm=marker
View
@@ -764,6 +764,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
656,
/**/
655,
/**/

0 comments on commit 6f9a476

Please sign in to comment.