Mercurial > vim
comparison src/optionstr.c @ 28459:52ef65c0637f v8.2.4754
patch 8.2.4754: using cached values after unsetting some environment variables
Commit: https://github.com/vim/vim/commit/7714231bb5b15f7c85453f3945c108478de1d08a
Author: LemonBoy <thatlemon@gmail.com>
Date: Fri Apr 15 20:50:46 2022 +0100
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)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Fri, 15 Apr 2022 22:00:03 +0200 |
parents | 4dcccb2673fe |
children | b93668df9160 |
comparison
equal
deleted
inserted
replaced
28458:9335b10b5eb3 | 28459:52ef65c0637f |
---|---|
642 } | 642 } |
643 #endif | 643 #endif |
644 | 644 |
645 /* | 645 /* |
646 * Handle string options that need some action to perform when changed. | 646 * Handle string options that need some action to perform when changed. |
647 * Returns NULL for success, or an error message for an error. | 647 * Returns NULL for success, or an unstranslated error message for an error. |
648 */ | 648 */ |
649 char * | 649 char * |
650 did_set_string_option( | 650 did_set_string_option( |
651 int opt_idx, // index in options[] table | 651 int opt_idx, // index in options[] table |
652 char_u **varp, // pointer to the option variable | 652 char_u **varp, // pointer to the option variable |
785 // 'helpfile' | 785 // 'helpfile' |
786 else if (varp == &p_hf) | 786 else if (varp == &p_hf) |
787 { | 787 { |
788 // May compute new values for $VIM and $VIMRUNTIME | 788 // May compute new values for $VIM and $VIMRUNTIME |
789 if (didset_vim) | 789 if (didset_vim) |
790 { | 790 vim_unsetenv_ext((char_u *)"VIM"); |
791 vim_setenv((char_u *)"VIM", (char_u *)""); | |
792 didset_vim = FALSE; | |
793 } | |
794 if (didset_vimruntime) | 791 if (didset_vimruntime) |
795 { | 792 vim_unsetenv_ext((char_u *)"VIMRUNTIME"); |
796 vim_setenv((char_u *)"VIMRUNTIME", (char_u *)""); | |
797 didset_vimruntime = FALSE; | |
798 } | |
799 } | 793 } |
800 | 794 |
801 #ifdef FEAT_SYN_HL | 795 #ifdef FEAT_SYN_HL |
802 // 'cursorlineopt' | 796 // 'cursorlineopt' |
803 else if (varp == &curwin->w_p_culopt | 797 else if (varp == &curwin->w_p_culopt |