1
0
forked from aniani/vim

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)
This commit is contained in:
Bram Moolenaar
2018-05-13 15:59:50 +02:00
parent 8b62e31003
commit 137374fd65
9 changed files with 63 additions and 2 deletions

View File

@@ -4479,6 +4479,17 @@ remove_tail(char_u *p, char_u *pend, char_u *name)
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.
*/