patch 8.0.1832: cannot use :unlet for an environment variable
Problem: Cannot use :unlet for an environment variable.
Solution: Make it work. Use unsetenv() if available. (Ken Takata,
closes #2855)
diff --git a/src/misc1.c b/src/misc1.c
index 6c77f4b..1ab55f0 100644
--- a/src/misc1.c
+++ b/src/misc1.c
@@ -4479,6 +4479,17 @@
return pend;
}
+ void
+vim_unsetenv(char_u *var)
+{
+#ifdef HAVE_UNSETENV
+ unsetenv((char *)var);
+#else
+ mch_setenv((char *)var, "", 0);
+#endif
+}
+
+
/*
* Our portable version of setenv.
*/