Mercurial > vim
diff src/vim9compile.c @ 25525:8880eb140a00 v8.2.3299
patch 8.2.3299: Vim9: exists() does not handle much at compile time
Commit: https://github.com/vim/vim/commit/5671f3f076573fa9133bc210d6580067698d9a1b
Author: Bram Moolenaar <Bram@vim.org>
Date: Thu Aug 5 22:48:11 2021 +0200
patch 8.2.3299: Vim9: exists() does not handle much at compile time
Problem: Vim9: exists() does not handle much at compile time.
Solution: Handle variable names. (closes https://github.com/vim/vim/issues/8688)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Thu, 05 Aug 2021 23:00:04 +0200 |
parents | 2063b858cad9 |
children | e0d6268c153a |
line wrap: on
line diff
--- a/src/vim9compile.c +++ b/src/vim9compile.c @@ -3417,8 +3417,8 @@ compile_call( s = skipwhite(s); if (*s == ')' && argvars[0].v_type == VAR_STRING && ((is_has && !dynamic_feature(argvars[0].vval.v_string)) - || (!is_has && (*argvars[0].vval.v_string == '+' - || *argvars[0].vval.v_string == '&')))) + || (!is_has && vim_strchr((char_u *)"+&:*", + *argvars[0].vval.v_string)))) { typval_T *tv = &ppconst->pp_tv[ppconst->pp_used];