diff options
author | Bram Moolenaar <Bram@vim.org> | 2020-02-02 22:24:04 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2020-02-02 22:24:04 +0100 |
commit | b283a8a6802ef8a46b17cb439f9514840c03698f (patch) | |
tree | f44c04ef936f4b0c366ab006f993bd076c6ea040 /src/misc1.c | |
parent | 0f18b6d17baa7d33f209a3184726a162c2bb7ed8 (diff) | |
download | vim-git-b283a8a6802ef8a46b17cb439f9514840c03698f.tar.gz |
patch 8.2.0200: Vim9 script commands not sufficiently testedv8.2.0200
Problem: Vim9 script commands not sufficiently tested.
Solution: Add more tests. Fix storing global variable. Make script
variables work.
Diffstat (limited to 'src/misc1.c')
-rw-r--r-- | src/misc1.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/misc1.c b/src/misc1.c index 85ab727d3..bb7137dc3 100644 --- a/src/misc1.c +++ b/src/misc1.c @@ -1854,6 +1854,22 @@ vim_unsetenv(char_u *var) /* + * 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. */ void |