diff src/ex_docmd.c @ 23050:50442f932ff7 v8.2.2071

patch 8.2.2071: Vim9: list assign doesn't except empty remainder list Commit: https://github.com/vim/vim/commit/da7c20c9531739bdefa9d4418e6765fb181066e9 Author: Bram Moolenaar <Bram@vim.org> Date: Mon Nov 30 21:12:19 2020 +0100 patch 8.2.2071: Vim9: list assign doesn't except empty remainder list Problem: Vim9: list assign doesn't except empty remainder list. Solution: Recognize list assignment with ";".
author Bram Moolenaar <Bram@vim.org>
date Mon, 30 Nov 2020 21:15:04 +0100
parents 75241f4377a4
children 57b6427c18e4
line wrap: on
line diff
--- a/src/ex_docmd.c
+++ b/src/ex_docmd.c
@@ -3356,7 +3356,14 @@ find_ex_command(
 	    if (*eap->cmd == '[')
 	    {
 		p = to_name_const_end(eap->cmd);
-		if (p == eap->cmd || *skipwhite(p) != '=')
+		if (p == eap->cmd && *p == '[')
+		{
+		    int count = 0;
+		    int	semicolon = FALSE;
+
+		    p = skip_var_list(eap->cmd, TRUE, &count, &semicolon, TRUE);
+		}
+		if (p == NULL || p == eap->cmd || *skipwhite(p) != '=')
 		{
 		    eap->cmdidx = CMD_eval;
 		    return eap->cmd;