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

patch 8.1.1692: using *{} for literal dict is not backwards compatible

Problem:    Using *{} for literal dict is not backwards compatible. (Yasuhiro
            Matsumoto)
Solution:   Use ~{} instead.
This commit is contained in:
Bram Moolenaar
2019-07-14 18:22:59 +02:00
parent 37d9f175a4
commit b8be54dcc5
14 changed files with 201 additions and 188 deletions

View File

@@ -4266,7 +4266,7 @@ eval6(
for (;;)
{
op = **arg;
if ((op != '*' || (*arg)[1] == '{') && op != '/' && op != '%')
if (op != '*' && op != '/' && op != '%')
break;
if (evaluate)
@@ -4392,7 +4392,7 @@ eval6(
* (expression) nested expression
* [expr, expr] List
* {key: val, key: val} Dictionary
* *{key: val, key: val} Dictionary with literal keys
* ~{key: val, key: val} Dictionary with literal keys
*
* Also handle:
* ! in front logical NOT
@@ -4577,9 +4577,9 @@ eval7(
break;
/*
* Dictionary: *{key: val, key: val}
* Dictionary: ~{key: val, key: val}
*/
case '*': if ((*arg)[1] == '{')
case '~': if ((*arg)[1] == '{')
{
++*arg;
ret = dict_get_tv(arg, rettv, evaluate, TRUE);