mirror of
https://github.com/tmux/tmux.git
synced 2025-09-01 20:57:00 +00:00
Add mode 2031 support to automatically report dark or light theme. tmux
will guess the theme from the background colour on terminals which do not themselves support the escape sequence. Written by Jonathan Slenders, GitHub issue 4353.
This commit is contained in:
13
session.c
13
session.c
@ -753,3 +753,16 @@ session_renumber_windows(struct session *s)
|
||||
RB_FOREACH_SAFE(wl, winlinks, &old_wins, wl1)
|
||||
winlink_remove(&old_wins, wl);
|
||||
}
|
||||
|
||||
/* Set the PANE_THEMECHANGED flag for every pane in this session. */
|
||||
void
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user