diff --git a/src/evalvars.c b/src/evalvars.c index cd1f1702f..dc66eb691 100644 --- 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)) diff --git a/src/version.c b/src/version.c index ee3db2271..05b4a519b 100644 --- a/src/version.c +++ b/src/version.c @@ -750,6 +750,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 2998, /**/ 2997, /**/