Mercurial > vim
changeset 17375:6f36caf4f702 v8.1.1686
patch 8.1.1686: "*" of "*{" is recognized as multipy operator
commit https://github.com/vim/vim/commit/2898ebb44cee62a70a11b44a97bdad8cc00157b1
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Jul 14 13:41:34 2019 +0200
patch 8.1.1686: "*" of "*{" is recognized as multipy operator
Problem: "*" of "*{" is recognized as multipy operator. (Yasuhiro Matsumoto)
Solution: Check for the "{".
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sun, 14 Jul 2019 13:45:05 +0200 |
parents | cfbd83fc1286 |
children | da3299b8b5c0 |
files | src/eval.c src/testdir/test_listdict.vim src/version.c |
diffstat | 3 files changed, 4 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/eval.c +++ b/src/eval.c @@ -4266,7 +4266,7 @@ eval6( for (;;) { op = **arg; - if (op != '*' && op != '/' && op != '%') + if ((op != '*' || (*arg)[1] == '{') && op != '/' && op != '%') break; if (evaluate)
--- a/src/testdir/test_listdict.vim +++ b/src/testdir/test_listdict.vim @@ -282,6 +282,7 @@ endfunc func Test_dict_literal_keys() call assert_equal({'one': 1, 'two2': 2, '3three': 3, '44': 4}, *{one: 1, two2: 2, 3three: 3, 44: 4},) + call assert_equal('2 3', trim(execute('echo 2 *{blue: 3}.blue'))) endfunc " Nasty: deepcopy() dict that refers to itself (fails when noref used)