summaryrefslogtreecommitdiff
path: root/src/misc1.c
diff options
context:
space:
mode:
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