mirror of
https://github.com/neovim/neovim.git
synced 2025-09-11 22:08:18 +00:00
vim-patch:8.2.4754: using cached values after unsetting some environment variables (#19872)
Problem: Still using cached values after unsetting some known environment
variables.
Solution: Take care of the side effects. (closes vim/vim#10194)
7714231bb5
Cherry-pick vim_setenv_ext() from patch 8.2.0200.
This commit is contained in:
@@ -7629,9 +7629,9 @@ static void f_setenv(typval_T *argvars, typval_T *rettv, FunPtr fptr)
|
||||
|
||||
if (argvars[1].v_type == VAR_SPECIAL
|
||||
&& argvars[1].vval.v_special == kSpecialVarNull) {
|
||||
os_unsetenv(name);
|
||||
vim_unsetenv_ext(name);
|
||||
} else {
|
||||
os_setenv(name, tv_get_string_buf(&argvars[1], valbuf), 1);
|
||||
vim_setenv_ext(name, tv_get_string_buf(&argvars[1], valbuf));
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user