diff options
author | Matthieu Coudron <mattator@gmail.com> | 2020-08-15 17:45:18 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-08-15 17:45:18 +0200 |
commit | 37aa9c9c94551ffed8ba5721d5b8ea8e172d7377 (patch) | |
tree | edc210f304d4353dbeb4224b5e42941f332d7a1d /src/nvim/eval.c | |
parent | 75aeb815b4db487186e1f4471b37f54430468c76 (diff) | |
parent | 056d99b0f6072030a8946303fce58a86fd83bf57 (diff) | |
download | rneovim-37aa9c9c94551ffed8ba5721d5b8ea8e172d7377.tar.gz rneovim-37aa9c9c94551ffed8ba5721d5b8ea8e172d7377.tar.bz2 rneovim-37aa9c9c94551ffed8ba5721d5b8ea8e172d7377.zip |
Merge pull request #12713 from janlazo/vim-8.2.1347
vim-patch:8.1.{573,1674,2097,2098,2341},8.2.{1347,1360,1361,1364,1369,1377,1379,1386,1409,1410,1438,1441,1458}
Diffstat (limited to 'src/nvim/eval.c')
-rw-r--r-- | src/nvim/eval.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/nvim/eval.c b/src/nvim/eval.c index 0cad5fd6c1..b37fd85659 100644 --- a/src/nvim/eval.c +++ b/src/nvim/eval.c @@ -760,7 +760,7 @@ int eval_expr_typval(const typval_T *expr, typval_T *argv, if (eval1_emsg(&s, rettv, true) == FAIL) { return FAIL; } - if (*s != NUL) { // check for trailing chars after expr + if (*skipwhite(s) != NUL) { // check for trailing chars after expr tv_clear(rettv); emsgf(_(e_invexpr2), s); return FAIL; @@ -2086,6 +2086,7 @@ char_u *get_lval(char_u *const name, typval_T *const rettv, tv_clear(&var1); return NULL; } + p = skipwhite(p); } // Optionally get the second index [ :expr]. @@ -5364,7 +5365,7 @@ static int dict_get_tv(char_u **arg, typval_T *rettv, int evaluate) if (eval1(&start, &tv, false) == FAIL) { // recursive! return FAIL; } - if (*start == '}') { + if (*skipwhite(start) == '}') { return NOTDONE; } } |