mirror of
https://github.com/neovim/neovim.git
synced 2025-09-17 08:48:16 +00:00
vim-patch:9.0.0409: #{g:x} was seen as a curly-braces expression
Problem: #{g:x} was seen as a curly-braces expression.
Solution: Do never see #{} as a curly-braces expression. (closes vim/vim#11075)
7c7e1e9b98
This commit is contained in:
@@ -4587,12 +4587,14 @@ static int dict_get_tv(char **arg, typval_T *rettv, int evaluate, bool literal)
|
||||
char *curly_expr = skipwhite(*arg + 1);
|
||||
char buf[NUMBUFLEN];
|
||||
|
||||
// First check if it's not a curly-braces thing: {expr}.
|
||||
// First check if it's not a curly-braces expression: {expr}.
|
||||
// Must do this without evaluating, otherwise a function may be called
|
||||
// twice. Unfortunately this means we need to call eval1() twice for the
|
||||
// first item.
|
||||
// But {} is an empty Dictionary.
|
||||
// "{}" is an empty Dictionary.
|
||||
// "#{abc}" is never a curly-braces expression.
|
||||
if (*curly_expr != '}'
|
||||
&& !literal
|
||||
&& eval1(&curly_expr, &tv, false) == OK
|
||||
&& *skipwhite(curly_expr) == '}') {
|
||||
return NOTDONE;
|
||||
|
Reference in New Issue
Block a user