summaryrefslogtreecommitdiff
path: root/src/misc1.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2020-02-02 22:24:04 +0100
committerBram Moolenaar <Bram@vim.org>2020-02-02 22:24:04 +0100
commitb283a8a6802ef8a46b17cb439f9514840c03698f (patch)
treef44c04ef936f4b0c366ab006f993bd076c6ea040 /src/misc1.c
parent0f18b6d17baa7d33f209a3184726a162c2bb7ed8 (diff)
downloadvim-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.c16
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