From fa71e9a07911715da596d618fe045943337c596b Mon Sep 17 00:00:00 2001 From: nicm Date: Tue, 22 Feb 2022 11:10:41 +0000 Subject: Add next_session_id format with the next session ID, GitHub issue 3078. --- session.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'session.c') diff --git a/session.c b/session.c index fd567926..9b9b0d9c 100644 --- a/session.c +++ b/session.c @@ -29,7 +29,7 @@ #include "tmux.h" struct sessions sessions; -static u_int next_session_id; +u_int next_session_id; struct session_groups session_groups = RB_INITIALIZER(&session_groups); static void session_free(int, short, void *); -- cgit From d54b18ca2bb1383b120e920412e1a7340c4b1416 Mon Sep 17 00:00:00 2001 From: nicm Date: Tue, 22 Feb 2022 13:31:18 +0000 Subject: Do not attempt to update focus (and crash) when there is no previous window. --- session.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'session.c') diff --git a/session.c b/session.c index 9b9b0d9c..5bc5330e 100644 --- a/session.c +++ b/session.c @@ -503,7 +503,8 @@ session_set_current(struct session *s, struct winlink *wl) winlink_stack_push(&s->lastw, s->curw); s->curw = wl; if (options_get_number(global_options, "focus-events")) { - window_update_focus(old->window); + if (old != NULL) + window_update_focus(old->window); window_update_focus(wl->window); } winlink_clear_flags(wl); -- cgit