]> granicus.if.org Git - vim/commitdiff
patch 8.2.2998: Vim9: disassemble test fails v8.2.2998
authorBram Moolenaar <Bram@vim.org>
Mon, 14 Jun 2021 19:32:21 +0000 (21:32 +0200)
committerBram Moolenaar <Bram@vim.org>
Mon, 14 Jun 2021 19:32:21 +0000 (21:32 +0200)
Problem:    Vim9: disassemble test fails.
Solution:   Add missing call to lookup_debug_var().

src/evalvars.c
src/version.c

index cd1f1702ffac77528cfda5f57a07ee256dc3a0b9..dc66eb69198c1bbbdc8e866307b046414d66c125 100644 (file)
@@ -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))
index ee3db22710880c1ba4eda5a71553555bb66ffe42..05b4a519b442b4c7b6c5bc6308f77e3acc86dafd 100644 (file)
@@ -750,6 +750,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    2998,
 /**/
     2997,
 /**/