diff options
author | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2020-10-07 00:45:05 -0400 |
---|---|---|
committer | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2020-10-07 00:56:38 -0400 |
commit | 20fc7ef161f3c40b957ba81a751af4639cce7776 (patch) | |
tree | f6297b64b8ce9c3d6f51ec71caf8592e848ca173 /src/nvim/eval.c | |
parent | d109a331446a998671bf54655df99238e2f1b093 (diff) | |
download | rneovim-20fc7ef161f3c40b957ba81a751af4639cce7776.tar.gz rneovim-20fc7ef161f3c40b957ba81a751af4639cce7776.tar.bz2 rneovim-20fc7ef161f3c40b957ba81a751af4639cce7776.zip |
vim-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.
https://github.com/vim/vim/commit/b8be54dcc517c9d57b62409945b7d4b90b6c3071
Diffstat (limited to 'src/nvim/eval.c')
-rw-r--r-- | src/nvim/eval.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/nvim/eval.c b/src/nvim/eval.c index 16d51d3a81..a4594d9ac8 100644 --- a/src/nvim/eval.c +++ b/src/nvim/eval.c @@ -3802,7 +3802,7 @@ static int eval6(char_u **arg, typval_T *rettv, int evaluate, int want_string) */ for (;; ) { op = **arg; - if ((op != '*' || (*arg)[1] == '{') && op != '/' && op != '%') { + if (op != '*' && op != '/' && op != '%') { break; } @@ -3906,7 +3906,7 @@ static int eval6(char_u **arg, typval_T *rettv, int evaluate, int want_string) // (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 @@ -4014,8 +4014,8 @@ static int eval7( case '[': ret = get_list_tv(arg, rettv, evaluate); break; - // Dictionary: *{key: val, key: val} - case '*': + // Dictionary: ~{key: val, key: val} + case '~': if ((*arg)[1] == '{') { (*arg)++; ret = dict_get_tv(arg, rettv, evaluate, true); |