diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2019-09-05 14:10:32 -0700 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2019-09-05 14:10:32 -0700 |
commit | 8b06231612cd608b2dce5e0a09bf40192a4803cb (patch) | |
tree | 04fbfef7b326574e296b2fe1a772829ac0af8be4 /src/nvim/main.c | |
parent | 096212d52c6375c19c046d86a7178bae91e287fc (diff) | |
parent | d3f1eb3024fa297c970a79dd24ef818e4aeb8525 (diff) | |
download | rneovim-8b06231612cd608b2dce5e0a09bf40192a4803cb.tar.gz rneovim-8b06231612cd608b2dce5e0a09bf40192a4803cb.tar.bz2 rneovim-8b06231612cd608b2dce5e0a09bf40192a4803cb.zip |
Merge #10869 'vim-patch:8.1.{0309,0362,0365,0515,1946}'
Diffstat (limited to 'src/nvim/main.c')
-rw-r--r-- | src/nvim/main.c | 25 |
1 files changed, 15 insertions, 10 deletions
diff --git a/src/nvim/main.c b/src/nvim/main.c index e7c45b1a7b..50e495c1e6 100644 --- a/src/nvim/main.c +++ b/src/nvim/main.c @@ -1638,11 +1638,12 @@ static void exe_pre_commands(mparm_T *parmp) if (cnt > 0) { curwin->w_cursor.lnum = 0; /* just in case.. */ sourcing_name = (char_u *)_("pre-vimrc command line"); - current_SID = SID_CMDARG; - for (i = 0; i < cnt; ++i) + current_sctx.sc_sid = SID_CMDARG; + for (i = 0; i < cnt; i++) { do_cmdline_cmd(cmds[i]); + } sourcing_name = NULL; - current_SID = 0; + current_sctx.sc_sid = 0; TIME_MSG("--cmd commands"); } } @@ -1663,16 +1664,18 @@ static void exe_commands(mparm_T *parmp) if (parmp->tagname == NULL && curwin->w_cursor.lnum <= 1) curwin->w_cursor.lnum = 0; sourcing_name = (char_u *)"command line"; - current_SID = SID_CARG; - for (i = 0; i < parmp->n_commands; ++i) { + current_sctx.sc_sid = SID_CARG; + current_sctx.sc_seq = 0; + for (i = 0; i < parmp->n_commands; i++) { do_cmdline_cmd(parmp->commands[i]); if (parmp->cmds_tofree[i]) xfree(parmp->commands[i]); } sourcing_name = NULL; - current_SID = 0; - if (curwin->w_cursor.lnum == 0) + current_sctx.sc_sid = 0; + if (curwin->w_cursor.lnum == 0) { curwin->w_cursor.lnum = 1; + } if (!exmode_active) msg_scroll = FALSE; @@ -1858,12 +1861,14 @@ static int execute_env(char *env) linenr_T save_sourcing_lnum = sourcing_lnum; sourcing_name = (char_u *)env; sourcing_lnum = 0; - scid_T save_sid = current_SID; - current_SID = SID_ENV; + const sctx_T save_current_sctx = current_sctx; + current_sctx.sc_sid = SID_ENV; + current_sctx.sc_seq = 0; + current_sctx.sc_lnum = 0; do_cmdline_cmd((char *)initstr); sourcing_name = save_sourcing_name; sourcing_lnum = save_sourcing_lnum; - current_SID = save_sid; + current_sctx = save_current_sctx; return OK; } return FAIL; |