comparison 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
comparison
equal deleted inserted replaced
23049:0741c52bf919 23050:50442f932ff7
3354 // If "[...]" has a line break "p" still points at the "[" and it 3354 // If "[...]" has a line break "p" still points at the "[" and it
3355 // can't be an assignment. 3355 // can't be an assignment.
3356 if (*eap->cmd == '[') 3356 if (*eap->cmd == '[')
3357 { 3357 {
3358 p = to_name_const_end(eap->cmd); 3358 p = to_name_const_end(eap->cmd);
3359 if (p == eap->cmd || *skipwhite(p) != '=') 3359 if (p == eap->cmd && *p == '[')
3360 {
3361 int count = 0;
3362 int semicolon = FALSE;
3363
3364 p = skip_var_list(eap->cmd, TRUE, &count, &semicolon, TRUE);
3365 }
3366 if (p == NULL || p == eap->cmd || *skipwhite(p) != '=')
3360 { 3367 {
3361 eap->cmdidx = CMD_eval; 3368 eap->cmdidx = CMD_eval;
3362 return eap->cmd; 3369 return eap->cmd;
3363 } 3370 }
3364 if (p > eap->cmd && *skipwhite(p) == '=') 3371 if (p > eap->cmd && *skipwhite(p) == '=')