patch 8.2.4754: using cached values after unsetting some environment variables
Problem: Still using cached values after unsetting some known environment
variables.
Solution: Take care of the side effects. (closes #10194)
diff --git a/src/vim9execute.c b/src/vim9execute.c
index da2822c..afa0dcf 100644
--- a/src/vim9execute.c
+++ b/src/vim9execute.c
@@ -2656,6 +2656,7 @@
case ISN_SOURCE:
{
int notused;
+
SOURCING_LNUM = iptr->isn_lnum;
if (may_load_script((int)iptr->isn_arg.number, ¬used)
== FAIL)
@@ -3490,7 +3491,7 @@
goto on_error;
break;
case ISN_UNLETENV:
- vim_unsetenv(iptr->isn_arg.unlet.ul_name);
+ vim_unsetenv_ext(iptr->isn_arg.unlet.ul_name);
break;
case ISN_LOCKUNLOCK: