Mercurial > vim
diff src/userfunc.c @ 25521:2063b858cad9 v8.2.3297
patch 8.2.3297: cannot use all commands inside a {} block
Commit: https://github.com/vim/vim/commit/63b9173693015b135aad8e3657bef5e7f776787e
Author: Bram Moolenaar <Bram@vim.org>
Date: Thu Aug 5 20:40:03 2021 +0200
patch 8.2.3297: cannot use all commands inside a {} block
Problem: Cannot use all commands inside a {} block after :command and
:autocmd.
Solution: Do consider \n to separate commands. (closes #8620)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Thu, 05 Aug 2021 20:45:04 +0200 |
parents | 9a4cb96c9550 |
children | 164cef0bc7ab |
line wrap: on
line diff
--- a/src/userfunc.c +++ b/src/userfunc.c @@ -3842,7 +3842,7 @@ define_function(exarg_T *eap, char_u *na { if (!eap->skip) list_functions(NULL); - eap->nextcmd = check_nextcmd(eap->arg); + set_nextcmd(eap, eap->arg); return NULL; } @@ -3869,7 +3869,7 @@ define_function(exarg_T *eap, char_u *na } if (*p == '/') ++p; - eap->nextcmd = check_nextcmd(p); + set_nextcmd(eap, p); return NULL; } @@ -3947,7 +3947,7 @@ define_function(exarg_T *eap, char_u *na semsg(_(e_trailing_arg), p); goto ret_free; } - eap->nextcmd = check_nextcmd(p); + set_nextcmd(eap, p); if (eap->nextcmd != NULL) *p = NUL; if (!eap->skip && !got_int) @@ -4655,7 +4655,7 @@ ex_delfunction(exarg_T *eap) semsg(_(e_trailing_arg), p); return; } - eap->nextcmd = check_nextcmd(p); + set_nextcmd(eap, p); if (eap->nextcmd != NULL) *p = NUL; @@ -4844,7 +4844,7 @@ ex_return(exarg_T *eap) if (returning) eap->nextcmd = NULL; else if (eap->nextcmd == NULL) // no argument - eap->nextcmd = check_nextcmd(arg); + set_nextcmd(eap, arg); if (eap->skip) --emsg_skip; @@ -5004,7 +5004,7 @@ ex_call(exarg_T *eap) } } else - eap->nextcmd = check_nextcmd(arg); + set_nextcmd(eap, arg); } end: