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

patch 9.0.1454: code indenting is confused by macros

Problem:    Code indenting is confused by macros.
Solution:   Put semicolon after the macros instead of inside. (Ozaki Kiichi,
            closes #12257)
This commit is contained in:
ichizok
2023-04-15 13:17:50 +01:00
committed by Bram Moolenaar
parent b49dfd0cf2
commit 7e5fe38efc
10 changed files with 66 additions and 56 deletions

View File

@@ -3101,21 +3101,21 @@ exe_pre_commands(mparm_T *parmp)
char_u **cmds = parmp->pre_commands;
int cnt = parmp->n_pre_commands;
int i;
ESTACK_CHECK_DECLARATION
ESTACK_CHECK_DECLARATION;
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
ESTACK_CHECK_SETUP;
# ifdef FEAT_EVAL
current_sctx.sc_sid = SID_CMDARG;
current_sctx.sc_sid = SID_CMDARG;
# endif
for (i = 0; i < cnt; ++i)
do_cmdline_cmd(cmds[i]);
ESTACK_CHECK_NOW
estack_pop();
for (i = 0; i < cnt; ++i)
do_cmdline_cmd(cmds[i]);
ESTACK_CHECK_NOW;
estack_pop();
# ifdef FEAT_EVAL
current_sctx.sc_sid = 0;
# endif
@@ -3129,7 +3129,7 @@ exe_pre_commands(mparm_T *parmp)
exe_commands(mparm_T *parmp)
{
int i;
ESTACK_CHECK_DECLARATION
ESTACK_CHECK_DECLARATION;
/*
* We start commands on line 0, make "vim +/pat file" match a
@@ -3140,7 +3140,7 @@ exe_commands(mparm_T *parmp)
if (parmp->tagname == NULL && curwin->w_cursor.lnum <= 1)
curwin->w_cursor.lnum = 0;
estack_push(ETYPE_ARGS, (char_u *)"command line", 0);
ESTACK_CHECK_SETUP
ESTACK_CHECK_SETUP;
#ifdef FEAT_EVAL
current_sctx.sc_sid = SID_CARG;
current_sctx.sc_seq = 0;
@@ -3151,7 +3151,7 @@ exe_commands(mparm_T *parmp)
if (parmp->cmds_tofree[i])
vim_free(parmp->commands[i]);
}
ESTACK_CHECK_NOW
ESTACK_CHECK_NOW;
estack_pop();
#ifdef FEAT_EVAL
current_sctx.sc_sid = 0;
@@ -3370,8 +3370,7 @@ process_env(
{
char_u *initstr;
sctx_T save_current_sctx;
ESTACK_CHECK_DECLARATION
ESTACK_CHECK_DECLARATION;
if ((initstr = mch_getenv(env)) == NULL || *initstr == NUL)
return FAIL;
@@ -3379,8 +3378,8 @@ process_env(
if (is_viminit)
vimrc_found(NULL, NULL);
estack_push(ETYPE_ENV, env, 0);
ESTACK_CHECK_SETUP
save_current_sctx = current_sctx;
ESTACK_CHECK_SETUP;
save_current_sctx = current_sctx;
current_sctx.sc_version = 1;
#ifdef FEAT_EVAL
current_sctx.sc_sid = SID_ENV;
@@ -3390,8 +3389,8 @@ process_env(
do_cmdline_cmd(initstr);
ESTACK_CHECK_NOW
estack_pop();
ESTACK_CHECK_NOW;
estack_pop();
current_sctx = save_current_sctx;
return OK;
}