Skip to content

Commit

Permalink
patch 8.2.1889: Vim9: errornous error for missing white space after {}
Browse files Browse the repository at this point in the history
Problem:    Vim9: errornous error for missing white space after {}.
Solution:   Don't skip over white space after {}. (issue vim#7167)
  • Loading branch information
brammool committed Oct 22, 2020
1 parent e6e70a1 commit b07a39d
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/dict.c
Original file line number Diff line number Diff line change
Expand Up @@ -950,7 +950,7 @@ eval_dict(char_u **arg, typval_T *rettv, evalarg_T *evalarg, int literal)
return FAIL;
}

*arg = skipwhite(*arg + 1);
*arg = *arg + 1;
if (evaluate)
rettv_dict_set(rettv, d);

Expand Down
6 changes: 6 additions & 0 deletions src/testdir/test_vim9_expr.vim
Original file line number Diff line number Diff line change
Expand Up @@ -1124,6 +1124,12 @@ def Test_expr5_vim9script()
END
CheckScriptFailure(lines, 'E15:', 2)

lines =<< trim END
vim9script
echo {} - 22
END
CheckScriptFailure(lines, 'E731:', 2)

lines =<< trim END
vim9script
echo 'abc' is? 'abc'
Expand Down
2 changes: 2 additions & 0 deletions src/version.c
Original file line number Diff line number Diff line change
Expand Up @@ -750,6 +750,8 @@ static char *(features[]) =

static int included_patches[] =
{ /* Add new patch number below this line */
/**/
1889,
/**/
1888,
/**/
Expand Down

0 comments on commit b07a39d

Please sign in to comment.