0
0
mirror of https://github.com/vim/vim.git synced 2025-10-02 05:04:20 -04:00

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)
This commit is contained in:
LemonBoy
2022-04-15 20:50:46 +01:00
committed by Bram Moolenaar
parent 31e5c60a68
commit 7714231bb5
8 changed files with 46 additions and 15 deletions

View File

@@ -644,7 +644,7 @@ check_stl_option(char_u *s)
/*
* Handle string options that need some action to perform when changed.
* Returns NULL for success, or an error message for an error.
* Returns NULL for success, or an unstranslated error message for an error.
*/
char *
did_set_string_option(
@@ -787,15 +787,9 @@ did_set_string_option(
{
// May compute new values for $VIM and $VIMRUNTIME
if (didset_vim)
{
vim_setenv((char_u *)"VIM", (char_u *)"");
didset_vim = FALSE;
}
vim_unsetenv_ext((char_u *)"VIM");
if (didset_vimruntime)
{
vim_setenv((char_u *)"VIMRUNTIME", (char_u *)"");
didset_vimruntime = FALSE;
}
vim_unsetenv_ext((char_u *)"VIMRUNTIME");
}
#ifdef FEAT_SYN_HL