mirror of
https://github.com/neovim/neovim.git
synced 2025-09-11 05:48:17 +00:00
getenv: return NULL if empty #2574
Making an environment variable empty can be a way of unsetting it for platforms that don't support unsetenv(). In most cases, we treat empty variables as having been unset. For all others, use os_env_exists().
This commit is contained in:
@@ -808,7 +808,7 @@ static void diff_file(char_u *tmp_orig, char_u *tmp_new, char_u *tmp_diff)
|
||||
|
||||
/* We don't want $DIFF_OPTIONS to get in the way. */
|
||||
if (os_getenv("DIFF_OPTIONS")) {
|
||||
vim_setenv("DIFF_OPTIONS", "");
|
||||
os_unsetenv("DIFF_OPTIONS");
|
||||
}
|
||||
|
||||
/* Build the diff command and execute it. Always use -a, binary
|
||||
|
Reference in New Issue
Block a user