0
0
mirror of https://github.com/vim/vim.git synced 2025-09-23 03:43:49 -04:00

patch 8.2.1068: Vim9: no line break allowed inside a dict

Problem:    Vim9: no line break allowed inside a dict.
Solution:   Handle line break inside a dict in Vim9 script.
This commit is contained in:
Bram Moolenaar
2020-06-27 14:11:53 +02:00
parent 0b1cd52ff6
commit 8ea9390b78
6 changed files with 82 additions and 15 deletions

View File

@@ -2996,7 +2996,7 @@ to_name_const_end(char_u *arg)
{
// Can be "#{a: 1}->Func()".
++p;
if (eval_dict(&p, &rettv, 0, TRUE) == FAIL)
if (eval_dict(&p, &rettv, NULL, TRUE) == FAIL)
p = arg;
}
else if (p == arg && *arg == '{')
@@ -3006,7 +3006,7 @@ to_name_const_end(char_u *arg)
// Can be "{x -> ret}()".
// Can be "{'a': 1}->Func()".
if (ret == NOTDONE)
ret = eval_dict(&p, &rettv, 0, FALSE);
ret = eval_dict(&p, &rettv, NULL, FALSE);
if (ret != OK)
p = arg;
}