This commit is contained in:
Jan Edmund Lazo 2018-09-29 22:11:50 -04:00
parent 458a6f58b6
commit cf7e351c24
4 changed files with 10 additions and 8 deletions

View File

@ -4533,9 +4533,10 @@ do_arg_all (
use_firstwin = true;
}
for (i = 0; i < count && i < opened_len && !got_int; ++i) {
if (alist == &global_alist && i == global_alist.al_ga.ga_len - 1)
for (i = 0; i < count && i < opened_len && !got_int; i++) {
if (alist == &global_alist && i == global_alist.al_ga.ga_len - 1) {
arg_had_last = true;
}
if (opened[i] > 0) {
/* Move the already present window to below the current window */
if (curwin->w_arg_idx != i) {

View File

@ -6567,9 +6567,9 @@ void alist_set(alist_T *al, int count, char_u **files, int use_curbuf, int *fnum
xfree(files);
}
if (al == &global_alist)
if (al == &global_alist) {
arg_had_last = false;
}
recursive--;
}

View File

@ -528,8 +528,8 @@ EXTERN buf_T *curbuf INIT(= NULL); // currently active buffer
*/
EXTERN alist_T global_alist; /* global argument list */
EXTERN int max_alist_id INIT(= 0); ///< the previous argument list id
EXTERN bool arg_had_last INIT(= false); /* accessed last file in
global_alist */
EXTERN bool arg_had_last INIT(= false); // accessed last file in
// global_alist
EXTERN int ru_col; /* column for ruler */
EXTERN int ru_wid; /* 'rulerfmt' width of ruler when non-zero */

View File

@ -1624,9 +1624,10 @@ static void edit_buffers(mparm_T *parmp, char_u *cwd)
win_close(curwin, true);
advance = false;
}
if (arg_idx == GARGCOUNT - 1)
if (arg_idx == GARGCOUNT - 1) {
arg_had_last = true;
++arg_idx;
}
arg_idx++;
}
os_breakcheck();
if (got_int) {