1
0
forked from aniani/vim

patch 8.2.0200: Vim9 script commands not sufficiently tested

Problem:    Vim9 script commands not sufficiently tested.
Solution:   Add more tests.  Fix storing global variable.  Make script
            variables work.
This commit is contained in:
Bram Moolenaar
2020-02-02 22:24:04 +01:00
parent 0f18b6d17b
commit b283a8a680
9 changed files with 301 additions and 58 deletions

View File

@@ -1853,6 +1853,22 @@ vim_unsetenv(char_u *var)
#endif
/*
* Set environment variable "name" and take care of side effects.
*/
void
vim_setenv_ext(char_u *name, char_u *val)
{
vim_setenv(name, val);
if (STRICMP(name, "HOME") == 0)
init_homedir();
else if (didset_vim && STRICMP(name, "VIM") == 0)
didset_vim = FALSE;
else if (didset_vimruntime
&& STRICMP(name, "VIMRUNTIME") == 0)
didset_vimruntime = FALSE;
}
/*
* Our portable version of setenv.
*/