diff --git a/src/ex_docmd.c b/src/ex_docmd.c index 58980738f2..c58c414108 100644 --- a/src/ex_docmd.c +++ b/src/ex_docmd.c @@ -2807,7 +2807,16 @@ parse_command_modifiers( // ignore comment and empty lines if (comment_start(eap->cmd, starts_with_colon)) + { + // a comment ends at a NL + if (eap->nextcmd == NULL) + { + eap->nextcmd = vim_strchr(eap->cmd, '\n'); + if (eap->nextcmd != NULL) + ++eap->nextcmd; + } return FAIL; + } if (*eap->cmd == NUL) { if (!skip_only) diff --git a/src/testdir/test_usercommands.vim b/src/testdir/test_usercommands.vim index 9cb592e230..3f15dc187d 100644 --- a/src/testdir/test_usercommands.vim +++ b/src/testdir/test_usercommands.vim @@ -624,7 +624,8 @@ endfunc func Test_usercmd_with_block() command DoSomething { - g:didit = 'yes' + g:didit = 'yes' # comment + # comment line g:didmore = 'more' } DoSomething diff --git a/src/version.c b/src/version.c index cfddf6bad6..742f89915b 100644 --- a/src/version.c +++ b/src/version.c @@ -755,6 +755,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 3405, /**/ 3404, /**/