mirror of
https://github.com/neovim/neovim.git
synced 2025-09-16 00:08:19 +00:00
cleanup environment variable handling + unit tests
* removed a putenv() implementation which isn't needed anymore * mch_getenv() and mch_setenv() are now functions in src/os/env.c * removes direct calls to getenv() and setenv() outside of src/os/env.c * refactored the logic of get_env_name into mch_getenvname_at_index * added unittests for the functions in os/env.c
This commit is contained in:

committed by
Thiago de Arruda

parent
fc86866402
commit
f2433aedc8
@@ -737,7 +737,7 @@ static void diff_file(char_u *tmp_orig, char_u *tmp_new, char_u *tmp_diff)
|
||||
cmd = alloc((unsigned)len);
|
||||
if (cmd != NULL) {
|
||||
/* We don't want $DIFF_OPTIONS to get in the way. */
|
||||
if (getenv("DIFF_OPTIONS"))
|
||||
if (mch_getenv("DIFF_OPTIONS"))
|
||||
vim_setenv((char_u *)"DIFF_OPTIONS", (char_u *)"");
|
||||
|
||||
/* Build the diff command and execute it. Always use -a, binary
|
||||
|
Reference in New Issue
Block a user