mirror of
https://github.com/neovim/neovim.git
synced 2025-10-16 23:06:14 +00:00
tests: termclose_spec: fix flaky SIGTERM test #7787
Followup to https://github.com/neovim/neovim/pull/7217. Build failure: https://travis-ci.org/neovim/neovim/jobs/322930672#L2958.
This commit is contained in:

committed by
Justin M. Keyes

parent
a30242d661
commit
46f432074e
@@ -2104,25 +2104,26 @@ void win_close_othertab(win_T *win, int free_buf, tabpage_T *tp)
|
||||
if (tp->tp_firstwin == tp->tp_lastwin) {
|
||||
char_u prev_idx[NUMBUFLEN];
|
||||
if (has_event(EVENT_TABCLOSED)) {
|
||||
vim_snprintf((char *)prev_idx, NUMBUFLEN, "%i", tabpage_index(tp));
|
||||
vim_snprintf((char *)prev_idx, NUMBUFLEN, "%i", tabpage_index(tp));
|
||||
}
|
||||
|
||||
if (tp == first_tabpage)
|
||||
if (tp == first_tabpage) {
|
||||
first_tabpage = tp->tp_next;
|
||||
else {
|
||||
} else {
|
||||
for (ptp = first_tabpage; ptp != NULL && ptp->tp_next != tp;
|
||||
ptp = ptp->tp_next)
|
||||
;
|
||||
ptp = ptp->tp_next) {
|
||||
// loop
|
||||
}
|
||||
if (ptp == NULL) {
|
||||
internal_error("win_close_othertab()");
|
||||
return;
|
||||
}
|
||||
ptp->tp_next = tp->tp_next;
|
||||
}
|
||||
free_tp = TRUE;
|
||||
free_tp = true;
|
||||
|
||||
if (has_event(EVENT_TABCLOSED)) {
|
||||
apply_autocmds(EVENT_TABCLOSED, prev_idx, prev_idx, false, win->w_buffer);
|
||||
apply_autocmds(EVENT_TABCLOSED, prev_idx, prev_idx, false, win->w_buffer);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user