mirror of
https://github.com/tmux/tmux.git
synced 2024-12-13 01:48:47 +00:00
Fix a couple of problems with grouped sessions reported by danh: redraw
properly and choose the correct last window after a window is killed.
This commit is contained in:
parent
19ea306606
commit
4feee126b8
@ -250,10 +250,8 @@ server_kill_window(struct window *w)
|
|||||||
|
|
||||||
if (session_detach(s, wl))
|
if (session_detach(s, wl))
|
||||||
server_destroy_session_group(s);
|
server_destroy_session_group(s);
|
||||||
else {
|
else
|
||||||
server_redraw_session(s);
|
server_redraw_session_group(s);
|
||||||
server_status_session_group(s);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -549,10 +549,10 @@ session_group_synchronize1(struct session *target, struct session *s)
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
/* If the current window has vanished, move to the next now. */
|
/* If the current window has vanished, move to the next now. */
|
||||||
if (s->curw != NULL) {
|
if (s->curw != NULL &&
|
||||||
while (winlink_find_by_index(ww, s->curw->idx) == NULL)
|
winlink_find_by_index(ww, s->curw->idx) == NULL &&
|
||||||
session_next(s, 0);
|
session_last(s) != 0 && session_previous(s, 0) != 0)
|
||||||
}
|
session_next(s, 0);
|
||||||
|
|
||||||
/* Save the old pointer and reset it. */
|
/* Save the old pointer and reset it. */
|
||||||
memcpy(&old_windows, &s->windows, sizeof old_windows);
|
memcpy(&old_windows, &s->windows, sizeof old_windows);
|
||||||
|
Loading…
Reference in New Issue
Block a user