Mercurial > vim
comparison src/vim9compile.c @ 22842:f2fbbb72ff28 v8.2.1968
patch 8.2.1968: Vim9: has() assumes a feature does not change dynamically
Commit: https://github.com/vim/vim/commit/8cebd43e9774d2624af43ee5b86939886f2ba490
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Nov 8 12:49:47 2020 +0100
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 https://github.com/vim/vim/issues/7265)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sun, 08 Nov 2020 13:00:04 +0100 |
parents | 8a5369f5f2b4 |
children | 53acb89ec9f2 |
comparison
equal
deleted
inserted
replaced
22841:079dd4d56017 | 22842:f2fbbb72ff28 |
---|---|
2618 if (*s == '"') | 2618 if (*s == '"') |
2619 (void)eval_string(&s, &argvars[0], TRUE); | 2619 (void)eval_string(&s, &argvars[0], TRUE); |
2620 else if (*s == '\'') | 2620 else if (*s == '\'') |
2621 (void)eval_lit_string(&s, &argvars[0], TRUE); | 2621 (void)eval_lit_string(&s, &argvars[0], TRUE); |
2622 s = skipwhite(s); | 2622 s = skipwhite(s); |
2623 if (*s == ')' && argvars[0].v_type == VAR_STRING) | 2623 if (*s == ')' && argvars[0].v_type == VAR_STRING |
2624 && !dynamic_feature(argvars[0].vval.v_string)) | |
2624 { | 2625 { |
2625 typval_T *tv = &ppconst->pp_tv[ppconst->pp_used]; | 2626 typval_T *tv = &ppconst->pp_tv[ppconst->pp_used]; |
2626 | 2627 |
2627 *arg = s + 1; | 2628 *arg = s + 1; |
2628 argvars[1].v_type = VAR_UNKNOWN; | 2629 argvars[1].v_type = VAR_UNKNOWN; |