mirror of
https://github.com/tmux/tmux.git
synced 2026-01-09 22:30:19 +00:00
Add some missing logging bits for themes.
This commit is contained in:
7
input.c
7
input.c
@@ -3395,14 +3395,19 @@ input_cancel_requests(struct client *c)
|
||||
static void
|
||||
input_report_current_theme(struct input_ctx *ictx)
|
||||
{
|
||||
switch (window_pane_get_theme(ictx->wp)) {
|
||||
struct window_pane *wp = ictx->wp;
|
||||
|
||||
switch (window_pane_get_theme(wp)) {
|
||||
case THEME_DARK:
|
||||
log_debug("%s: %%%u dark theme", __func__, wp->id);
|
||||
input_reply(ictx, 0, "\033[?997;1n");
|
||||
break;
|
||||
case THEME_LIGHT:
|
||||
log_debug("%s: %%%u light theme", __func__, wp->id);
|
||||
input_reply(ictx, 0, "\033[?997;2n");
|
||||
break;
|
||||
case THEME_UNKNOWN:
|
||||
log_debug("%s: %%%u unknown theme", __func__, wp->id);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -382,6 +382,14 @@ key_string_lookup_key(key_code key, int with_flags)
|
||||
s = "PasteEnd";
|
||||
goto append;
|
||||
}
|
||||
if (key == KEYC_REPORT_DARK_THEME) {
|
||||
s = "ReportDarkTheme";
|
||||
goto append;
|
||||
}
|
||||
if (key == KEYC_REPORT_LIGHT_THEME) {
|
||||
s = "ReportLightTheme";
|
||||
goto append;
|
||||
}
|
||||
if (key == KEYC_MOUSE) {
|
||||
s = "Mouse";
|
||||
goto append;
|
||||
|
||||
2
screen.c
2
screen.c
@@ -739,6 +739,8 @@ screen_mode_to_string(int mode)
|
||||
strlcat(tmp, "KEYS_EXTENDED,", sizeof tmp);
|
||||
if (mode & MODE_KEYS_EXTENDED_2)
|
||||
strlcat(tmp, "KEYS_EXTENDED_2,", sizeof tmp);
|
||||
if (mode & MODE_THEME_UPDATES)
|
||||
strlcat(tmp, "THEME_UPDATES,", sizeof tmp);
|
||||
tmp[strlen(tmp) - 1] = '\0';
|
||||
return (tmp);
|
||||
}
|
||||
|
||||
5
window.c
5
window.c
@@ -1932,17 +1932,18 @@ window_pane_send_theme_update(struct window_pane *wp)
|
||||
return;
|
||||
if (~wp->screen->mode & MODE_THEME_UPDATES)
|
||||
return;
|
||||
|
||||
switch (window_pane_get_theme(wp)) {
|
||||
case THEME_LIGHT:
|
||||
log_debug("%s: %%%u light theme", __func__, wp->id);
|
||||
input_key_pane(wp, KEYC_REPORT_LIGHT_THEME, NULL);
|
||||
break;
|
||||
case THEME_DARK:
|
||||
log_debug("%s: %%%u dark theme", __func__, wp->id);
|
||||
input_key_pane(wp, KEYC_REPORT_DARK_THEME, NULL);
|
||||
break;
|
||||
case THEME_UNKNOWN:
|
||||
log_debug("%s: %%%u unknown theme", __func__, wp->id);
|
||||
break;
|
||||
}
|
||||
|
||||
wp->flags &= ~PANE_THEMECHANGED;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user