mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
vim-patch:8.1.1686: "*" of "*{" is recognized as multipy operator
Problem: "*" of "*{" is recognized as multipy operator. (Yasuhiro Matsumoto)
Solution: Check for the "{".
2898ebb44c
This commit is contained in:
parent
7ca5dc2519
commit
d109a33144
@ -3802,8 +3802,9 @@ static int eval6(char_u **arg, typval_T *rettv, int evaluate, int want_string)
|
|||||||
*/
|
*/
|
||||||
for (;; ) {
|
for (;; ) {
|
||||||
op = **arg;
|
op = **arg;
|
||||||
if (op != '*' && op != '/' && op != '%')
|
if ((op != '*' || (*arg)[1] == '{') && op != '/' && op != '%') {
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
if (evaluate) {
|
if (evaluate) {
|
||||||
if (rettv->v_type == VAR_FLOAT) {
|
if (rettv->v_type == VAR_FLOAT) {
|
||||||
|
@ -282,6 +282,7 @@ endfunc
|
|||||||
|
|
||||||
func Test_dict_literal_keys()
|
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({'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
|
endfunc
|
||||||
|
|
||||||
" Nasty: deepcopy() dict that refers to itself (fails when noref used)
|
" Nasty: deepcopy() dict that refers to itself (fails when noref used)
|
||||||
|
Loading…
Reference in New Issue
Block a user