mirror of
https://github.com/tmux/tmux.git
synced 2024-12-25 10:58:48 +00:00
Correct visited flag when the last window list is rebuilt by renumbering
windows, appears to fix hang reported by Mark Kelly.
This commit is contained in:
parent
2f74e811f1
commit
b13c230749
@ -739,9 +739,12 @@ session_renumber_windows(struct session *s)
|
|||||||
memcpy(&old_lastw, &s->lastw, sizeof old_lastw);
|
memcpy(&old_lastw, &s->lastw, sizeof old_lastw);
|
||||||
TAILQ_INIT(&s->lastw);
|
TAILQ_INIT(&s->lastw);
|
||||||
TAILQ_FOREACH(wl, &old_lastw, sentry) {
|
TAILQ_FOREACH(wl, &old_lastw, sentry) {
|
||||||
|
wl->flags &= ~WINLINK_VISITED;
|
||||||
wl_new = winlink_find_by_window(&s->windows, wl->window);
|
wl_new = winlink_find_by_window(&s->windows, wl->window);
|
||||||
if (wl_new != NULL)
|
if (wl_new != NULL) {
|
||||||
TAILQ_INSERT_TAIL(&s->lastw, wl_new, sentry);
|
TAILQ_INSERT_TAIL(&s->lastw, wl_new, sentry);
|
||||||
|
wl_new->flags |= WINLINK_VISITED;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Set the current window. */
|
/* Set the current window. */
|
||||||
|
Loading…
Reference in New Issue
Block a user