mirror of
https://github.com/tmux/tmux.git
synced 2025-04-13 23:08:49 +00:00
Do not try to trigger theme changed if session is NULL.
This commit is contained in:
parent
53b0e0bc02
commit
ef923d28ff
10
session.c
10
session.c
@ -363,7 +363,7 @@ session_detach(struct session *s, struct winlink *wl)
|
||||
|
||||
if (RB_EMPTY(&s->windows))
|
||||
return (1);
|
||||
return (0);
|
||||
return (0);
|
||||
}
|
||||
|
||||
/* Return if session has window. */
|
||||
@ -761,8 +761,10 @@ session_theme_changed(struct session *s)
|
||||
struct window_pane *wp;
|
||||
struct winlink *wl;
|
||||
|
||||
RB_FOREACH(wl, winlinks, &s->windows) {
|
||||
TAILQ_FOREACH(wp, &wl->window->panes, entry)
|
||||
wp->flags |= PANE_THEMECHANGED;
|
||||
if (s != NULL) {
|
||||
RB_FOREACH(wl, winlinks, &s->windows) {
|
||||
TAILQ_FOREACH(wp, &wl->window->panes, entry)
|
||||
wp->flags |= PANE_THEMECHANGED;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -795,12 +795,12 @@ tty_keys_next(struct tty *tty)
|
||||
switch (tty_keys_colours(tty, buf, len, &size, &tty->fg, &tty->bg)) {
|
||||
case 0: /* yes */
|
||||
key = KEYC_UNKNOWN;
|
||||
session_theme_changed(tty->client->session);
|
||||
session_theme_changed(c->session);
|
||||
goto complete_key;
|
||||
case -1: /* no, or not valid */
|
||||
break;
|
||||
case 1: /* partial */
|
||||
session_theme_changed(tty->client->session);
|
||||
session_theme_changed(c->session);
|
||||
goto partial_key;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user