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:
11
src/misc1.c
11
src/misc1.c
@@ -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.
|
||||
*/
|
||||
|
Reference in New Issue
Block a user