0
0
mirror of https://github.com/vim/vim.git synced 2025-09-29 04:34:16 -04:00

patch 9.0.1196: code is indented more than necessary

Problem:    Code is indented more than necessary.
Solution:   Use an early return where it makes sense. (Yegappan Lakshmanan,
            closes #11813)
This commit is contained in:
Yegappan Lakshmanan
2023-01-14 12:32:28 +00:00
committed by Bram Moolenaar
parent 378e6c03f9
commit e857598896
16 changed files with 678 additions and 676 deletions

View File

@@ -3099,23 +3099,23 @@ exe_pre_commands(mparm_T *parmp)
int i;
ESTACK_CHECK_DECLARATION
if (cnt > 0)
{
curwin->w_cursor.lnum = 0; // just in case..
estack_push(ETYPE_ARGS, (char_u *)_("pre-vimrc command line"), 0);
ESTACK_CHECK_SETUP
if (cnt <= 0)
return;
curwin->w_cursor.lnum = 0; // just in case..
estack_push(ETYPE_ARGS, (char_u *)_("pre-vimrc command line"), 0);
ESTACK_CHECK_SETUP
# ifdef FEAT_EVAL
current_sctx.sc_sid = SID_CMDARG;
# endif
for (i = 0; i < cnt; ++i)
do_cmdline_cmd(cmds[i]);
ESTACK_CHECK_NOW
ESTACK_CHECK_NOW
estack_pop();
# ifdef FEAT_EVAL
current_sctx.sc_sid = 0;
current_sctx.sc_sid = 0;
# endif
TIME_MSG("--cmd commands");
}
TIME_MSG("--cmd commands");
}
/*
@@ -3369,28 +3369,27 @@ process_env(
ESTACK_CHECK_DECLARATION
if ((initstr = mch_getenv(env)) != NULL && *initstr != NUL)
{
if (is_viminit)
vimrc_found(NULL, NULL);
estack_push(ETYPE_ENV, env, 0);
ESTACK_CHECK_SETUP
if ((initstr = mch_getenv(env)) == NULL || *initstr == NUL)
return FAIL;
if (is_viminit)
vimrc_found(NULL, NULL);
estack_push(ETYPE_ENV, env, 0);
ESTACK_CHECK_SETUP
save_current_sctx = current_sctx;
current_sctx.sc_version = 1;
current_sctx.sc_version = 1;
#ifdef FEAT_EVAL
current_sctx.sc_sid = SID_ENV;
current_sctx.sc_seq = 0;
current_sctx.sc_lnum = 0;
current_sctx.sc_sid = SID_ENV;
current_sctx.sc_seq = 0;
current_sctx.sc_lnum = 0;
#endif
do_cmdline_cmd(initstr);
do_cmdline_cmd(initstr);
ESTACK_CHECK_NOW
ESTACK_CHECK_NOW
estack_pop();
current_sctx = save_current_sctx;
return OK;
}
return FAIL;
current_sctx = save_current_sctx;
return OK;
}
#if (defined(UNIX) || defined(VMS)) && !defined(NO_VIM_MAIN)