Mercurial > vim
changeset 24922:0d8baefcf4ed v8.2.2998
patch 8.2.2998: Vim9: disassemble test fails
Commit: https://github.com/vim/vim/commit/1b0a9dd413c03054f461a01531e010ad739617a7
Author: Bram Moolenaar <Bram@vim.org>
Date: Mon Jun 14 21:32:21 2021 +0200
patch 8.2.2998: Vim9: disassemble test fails
Problem: Vim9: disassemble test fails.
Solution: Add missing call to lookup_debug_var().
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Mon, 14 Jun 2021 21:45:03 +0200 |
parents | a08e12346f59 |
children | 98a551814ae5 |
files | src/evalvars.c src/version.c |
diffstat | 2 files changed, 12 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/src/evalvars.c +++ b/src/evalvars.c @@ -2571,13 +2571,17 @@ eval_variable( cc = name[len]; name[len] = NUL; - // Check for user-defined variables. - v = find_var(name, NULL, flags & EVAL_VAR_NOAUTOLOAD); - if (v != NULL) + // Check for local variable when debugging. + if ((tv = lookup_debug_var(name)) == NULL) { - tv = &v->di_tv; - if (dip != NULL) - *dip = v; + // Check for user-defined variables. + v = find_var(name, NULL, flags & EVAL_VAR_NOAUTOLOAD); + if (v != NULL) + { + tv = &v->di_tv; + if (dip != NULL) + *dip = v; + } } if (tv == NULL && (in_vim9script() || STRNCMP(name, "s:", 2) == 0))