1
0
forked from aniani/vim

patch 8.2.1968: Vim9: has() assumes a feature does not change dynamically

Problem:    Vim9: has() assumes a feature does not change dynamically.
Solution:   Check whether a feature may change dynamically. (closes #7265)
This commit is contained in:
Bram Moolenaar
2020-11-08 12:49:47 +01:00
parent 59d8e56e04
commit 8cebd43e97
5 changed files with 141 additions and 1 deletions

View File

@@ -2620,7 +2620,8 @@ compile_call(
else if (*s == '\'')
(void)eval_lit_string(&s, &argvars[0], TRUE);
s = skipwhite(s);
if (*s == ')' && argvars[0].v_type == VAR_STRING)
if (*s == ')' && argvars[0].v_type == VAR_STRING
&& !dynamic_feature(argvars[0].vval.v_string))
{
typval_T *tv = &ppconst->pp_tv[ppconst->pp_used];