diff src/eval.c @ 20142:fe8d0a4344df v8.2.0626

patch 8.2.0626: Vim9: wrong syntax of function in Vim9 script Commit: https://github.com/vim/vim/commit/f93c7fea084a99848d512ff2732041d4b41d93c8 Author: Bram Moolenaar <Bram@vim.org> Date: Thu Apr 23 22:16:53 2020 +0200 patch 8.2.0626: Vim9: wrong syntax of function in Vim9 script Problem: Vim9: wrong syntax of function in Vim9 script. Solution: Give error for missing space. Implement :echomsg and :echoerr. (closes #5670)
author Bram Moolenaar <Bram@vim.org>
date Thu, 23 Apr 2020 22:30:03 +0200
parents 0b35a7ffceb2
children 49694eceaa55
line wrap: on
line diff
--- a/src/eval.c
+++ b/src/eval.c
@@ -34,8 +34,6 @@ static char *e_float_as_string = N_("E80
  */
 static int current_copyID = 0;
 
-static int echo_attr = 0;   // attributes used for ":echo"
-
 /*
  * Info used by a ":for" loop.
  */
@@ -6145,7 +6143,6 @@ ex_execute(exarg_T *eap)
     char_u	*p;
     garray_T	ga;
     int		len;
-    int		save_did_emsg;
 
     ga_init2(&ga, 1, 80);
 
@@ -6213,8 +6210,9 @@ ex_execute(exarg_T *eap)
 	}
 	else if (eap->cmdidx == CMD_echoerr)
 	{
+	    int		save_did_emsg = did_emsg;
+
 	    // We don't want to abort following commands, restore did_emsg.
-	    save_did_emsg = did_emsg;
 	    emsg(ga.ga_data);
 	    if (!force_abort)
 		did_emsg = save_did_emsg;