From 8cebd43e9774d2624af43ee5b86939886f2ba490 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Sun, 8 Nov 2020 12:49:47 +0100 Subject: 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) --- src/vim9compile.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/vim9compile.c') diff --git a/src/vim9compile.c b/src/vim9compile.c index 5ade42ad5..bda1ab3e4 100644 --- a/src/vim9compile.c +++ b/src/vim9compile.c @@ -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]; -- cgit v1.2.1