Add support for the OSC 4 and OSC 104 palette setting escape sequences,

from S Gilles.
This commit is contained in:
nicm
2017-01-07 15:28:13 +00:00
parent cae0fbbe8c
commit 314e933914
9 changed files with 185 additions and 20 deletions

View File

@ -230,6 +230,7 @@ window_clock_draw_screen(struct window_pane *wp)
screen_write_cursormove(&ctx, x, y);
memcpy(&gc, &grid_default_cell, sizeof gc);
gc.flags |= GRID_FLAG_NOPALETTE;
gc.fg = colour;
screen_write_puts(&ctx, &gc, "%s", tim);
}
@ -242,6 +243,7 @@ window_clock_draw_screen(struct window_pane *wp)
y = (screen_size_y(s) / 2) - 3;
memcpy(&gc, &grid_default_cell, sizeof gc);
gc.flags |= GRID_FLAG_NOPALETTE;
gc.bg = colour;
for (ptr = tim; *ptr != '\0'; ptr++) {
if (*ptr >= '0' && *ptr <= '9')