diff src/ex_docmd.c @ 20239:2135b4641680 v8.2.0675

patch 8.2.0675: Vim9: no support for closures Commit: https://github.com/vim/vim/commit/b84a381c75e50ca0e0a24cc3e152d0c70f8c2c7d Author: Bram Moolenaar <Bram@vim.org> Date: Fri May 1 15:44:29 2020 +0200 patch 8.2.0675: Vim9: no support for closures Problem: Vim9: no support for closures. Solution: Do not re-use stack entries.
author Bram Moolenaar <Bram@vim.org>
date Fri, 01 May 2020 15:45:04 +0200
parents 06a1dd50463e
children 3fe45aa3bbc5
line wrap: on
line diff
--- a/src/ex_docmd.c
+++ b/src/ex_docmd.c
@@ -3157,7 +3157,7 @@ append_command(char_u *cmd)
 find_ex_command(
 	exarg_T *eap,
 	int	*full UNUSED,
-	int	(*lookup)(char_u *, size_t, cctx_T *) UNUSED,
+	void	*(*lookup)(char_u *, size_t, cctx_T *) UNUSED,
 	cctx_T	*cctx UNUSED)
 {
     int		len;
@@ -3197,7 +3197,7 @@ find_ex_command(
 	    // "g:var = expr"
 	    // "var = expr"  where "var" is a local var name.
 	    if (((p - eap->cmd) > 2 && eap->cmd[1] == ':')
-		    || lookup(eap->cmd, p - eap->cmd, cctx) >= 0)
+		    || lookup(eap->cmd, p - eap->cmd, cctx) != NULL)
 	    {
 		eap->cmdidx = CMD_let;
 		return eap->cmd;