diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-13 07:39:57 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-13 07:40:16 +0000 |
commit | 6af24b2457752c0d36aaf9f29f03d39afd09937f (patch) | |
tree | 2671b594908d1f971de6b2a2d473f97dfb7291d2 /src/arglist.c | |
parent | Releasing progress-linux version 2:9.1.0016-1~progress7.99u1. (diff) | |
download | vim-6af24b2457752c0d36aaf9f29f03d39afd09937f.tar.xz vim-6af24b2457752c0d36aaf9f29f03d39afd09937f.zip |
Merging upstream version 2:9.1.0199.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/arglist.c')
-rw-r--r-- | src/arglist.c | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/src/arglist.c b/src/arglist.c index d28b31d..187e16e 100644 --- a/src/arglist.c +++ b/src/arglist.c @@ -502,7 +502,7 @@ do_arglist( void set_arglist(char_u *str) { - do_arglist(str, AL_SET, 0, FALSE); + do_arglist(str, AL_SET, 0, TRUE); } /* @@ -682,6 +682,7 @@ do_argfile(exarg_T *eap, int argn) int other; char_u *p; int old_arg_idx = curwin->w_arg_idx; + int is_split_cmd = *eap->cmd == 's'; if (ERROR_IF_ANY_POPUP_WINDOW) return; @@ -697,13 +698,18 @@ do_argfile(exarg_T *eap, int argn) return; } + if (!is_split_cmd + && (&ARGLIST[argn])->ae_fnum != curbuf->b_fnum + && !check_can_set_curbuf_forceit(eap->forceit)) + return; + setpcmark(); #ifdef FEAT_GUI need_mouse_correct = TRUE; #endif // split window or create new tab page first - if (*eap->cmd == 's' || cmdmod.cmod_tab != 0) + if (is_split_cmd || cmdmod.cmod_tab != 0) { if (win_split(0, 0) == FAIL) return; @@ -1253,10 +1259,6 @@ do_arg_all( // When the ":tab" modifier was used do this for all tab pages. arg_all_close_unused_windows(&aall); - // Now set the last used tabpage to where we started. - if (valid_tabpage(new_lu_tp)) - lastused_tabpage = new_lu_tp; - // Open a window for files in the argument list that don't have one. // ARGCOUNT may change while doing this, because of autocommands. if (count > aall.opened_len || count <= 0) @@ -1291,6 +1293,11 @@ do_arg_all( // to window with first arg if (valid_tabpage(aall.new_curtab)) goto_tabpage_tp(aall.new_curtab, TRUE, TRUE); + + // Now set the last used tabpage to where we started. + if (valid_tabpage(new_lu_tp)) + lastused_tabpage = new_lu_tp; + if (win_valid(aall.new_curwin)) win_enter(aall.new_curwin, FALSE); |