mirror of
https://github.com/neovim/neovim.git
synced 2025-09-16 00:08:19 +00:00
main.c: remove useless call
Vim's vimrc_found() also handles setting 'nocompatible', that's why it does vimrc_found(NULL, NULL).
This commit is contained in:
@@ -1735,7 +1735,7 @@ static bool do_user_initialization(void)
|
|||||||
FUNC_ATTR_WARN_UNUSED_RESULT
|
FUNC_ATTR_WARN_UNUSED_RESULT
|
||||||
{
|
{
|
||||||
bool do_exrc = p_exrc;
|
bool do_exrc = p_exrc;
|
||||||
if (process_env("VIMINIT", true) == OK) {
|
if (process_env("VIMINIT") == OK) {
|
||||||
do_exrc = p_exrc;
|
do_exrc = p_exrc;
|
||||||
return do_exrc;
|
return do_exrc;
|
||||||
}
|
}
|
||||||
@@ -1780,7 +1780,7 @@ static bool do_user_initialization(void)
|
|||||||
} while (iter != NULL);
|
} while (iter != NULL);
|
||||||
xfree(config_dirs);
|
xfree(config_dirs);
|
||||||
}
|
}
|
||||||
if (process_env("EXINIT", false) == OK) {
|
if (process_env("EXINIT") == OK) {
|
||||||
do_exrc = p_exrc;
|
do_exrc = p_exrc;
|
||||||
return do_exrc;
|
return do_exrc;
|
||||||
}
|
}
|
||||||
@@ -1844,18 +1844,14 @@ static void source_startup_scripts(const mparm_T *const parmp)
|
|||||||
/// Get an environment variable, and execute it as Ex commands.
|
/// Get an environment variable, and execute it as Ex commands.
|
||||||
///
|
///
|
||||||
/// @param env environment variable to execute
|
/// @param env environment variable to execute
|
||||||
/// @param is_viminit when true, called for VIMINIT
|
|
||||||
///
|
///
|
||||||
/// @return FAIL if the environment variable was not executed,
|
/// @return FAIL if the environment variable was not executed,
|
||||||
/// OK otherwise.
|
/// OK otherwise.
|
||||||
static int process_env(char *env, bool is_viminit)
|
static int process_env(char *env)
|
||||||
FUNC_ATTR_NONNULL_ALL
|
FUNC_ATTR_NONNULL_ALL
|
||||||
{
|
{
|
||||||
const char *initstr = os_getenv(env);
|
const char *initstr = os_getenv(env);
|
||||||
if (initstr != NULL) {
|
if (initstr != NULL) {
|
||||||
if (is_viminit) {
|
|
||||||
vimrc_found(NULL, NULL);
|
|
||||||
}
|
|
||||||
char_u *save_sourcing_name = sourcing_name;
|
char_u *save_sourcing_name = sourcing_name;
|
||||||
linenr_T save_sourcing_lnum = sourcing_lnum;
|
linenr_T save_sourcing_lnum = sourcing_lnum;
|
||||||
sourcing_name = (char_u *)env;
|
sourcing_name = (char_u *)env;
|
||||||
|
Reference in New Issue
Block a user