mirror of
https://github.com/tmux/tmux.git
synced 2024-11-18 10:28:54 +00:00
Do not attempt to update focus (and crash) when there is no previous window.
This commit is contained in:
parent
fa71e9a079
commit
d54b18ca2b
@ -503,6 +503,7 @@ session_set_current(struct session *s, struct winlink *wl)
|
|||||||
winlink_stack_push(&s->lastw, s->curw);
|
winlink_stack_push(&s->lastw, s->curw);
|
||||||
s->curw = wl;
|
s->curw = wl;
|
||||||
if (options_get_number(global_options, "focus-events")) {
|
if (options_get_number(global_options, "focus-events")) {
|
||||||
|
if (old != NULL)
|
||||||
window_update_focus(old->window);
|
window_update_focus(old->window);
|
||||||
window_update_focus(wl->window);
|
window_update_focus(wl->window);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user