diff options
author | Scott Prager <splinterofchaos@gmail.com> | 2015-05-03 09:25:53 -0400 |
---|---|---|
committer | Scott Prager <splinterofchaos@gmail.com> | 2015-05-29 13:12:12 -0400 |
commit | 412d246be71bd99cb4edde4e6f984b0b0d91bcd9 (patch) | |
tree | 01307051583b9cf2faf56778a9bd88e00d2a2122 /src/nvim/diff.c | |
parent | fa0f1222212704c93ab828b876bda5e9e1cb507e (diff) | |
download | rneovim-412d246be71bd99cb4edde4e6f984b0b0d91bcd9.tar.gz rneovim-412d246be71bd99cb4edde4e6f984b0b0d91bcd9.tar.bz2 rneovim-412d246be71bd99cb4edde4e6f984b0b0d91bcd9.zip |
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().
Diffstat (limited to 'src/nvim/diff.c')
-rw-r--r-- | src/nvim/diff.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nvim/diff.c b/src/nvim/diff.c index 7c1a9de623..6e2b3056e4 100644 --- a/src/nvim/diff.c +++ b/src/nvim/diff.c @@ -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 |