diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2018-05-18 19:33:28 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-05-18 19:33:28 +0200 |
commit | 2ed2939597d217f12f9f6da1877684703aa9301f (patch) | |
tree | a8f07a3e7539dcd781b29df6cdc4719551ab655c /src/nvim/main.c | |
parent | 0ed297bdb495fa072053b3e28e0c504c7107cf5c (diff) | |
parent | 91c4de83c9de9049fc706f319deea38e9436502e (diff) | |
download | rneovim-2ed2939597d217f12f9f6da1877684703aa9301f.tar.gz rneovim-2ed2939597d217f12f9f6da1877684703aa9301f.tar.bz2 rneovim-2ed2939597d217f12f9f6da1877684703aa9301f.zip |
Merge #8406 'stdpath(): handle NULL default values'
Diffstat (limited to 'src/nvim/main.c')
-rw-r--r-- | src/nvim/main.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/src/nvim/main.c b/src/nvim/main.c index a4ed868af1..8b0d3bb2cc 100644 --- a/src/nvim/main.c +++ b/src/nvim/main.c @@ -1735,7 +1735,7 @@ static bool do_user_initialization(void) FUNC_ATTR_WARN_UNUSED_RESULT { bool do_exrc = p_exrc; - if (process_env("VIMINIT", true) == OK) { + if (process_env("VIMINIT") == OK) { do_exrc = p_exrc; return do_exrc; } @@ -1780,7 +1780,7 @@ static bool do_user_initialization(void) } while (iter != NULL); xfree(config_dirs); } - if (process_env("EXINIT", false) == OK) { + if (process_env("EXINIT") == OK) { do_exrc = p_exrc; return do_exrc; } @@ -1844,17 +1844,14 @@ static void source_startup_scripts(const mparm_T *const parmp) /// Get an environment variable, and execute it as Ex commands. /// /// @param env environment variable to execute -/// @param is_viminit when true, called for VIMINIT /// /// @return FAIL if the environment variable was not executed, /// OK otherwise. -static int process_env(char *env, bool is_viminit) +static int process_env(char *env) + FUNC_ATTR_NONNULL_ALL { const char *initstr = os_getenv(env); if (initstr != NULL) { - if (is_viminit) { - vimrc_found(NULL, NULL); - } char_u *save_sourcing_name = sourcing_name; linenr_T save_sourcing_lnum = sourcing_lnum; sourcing_name = (char_u *)env; |