mirror of
https://github.com/tmux/tmux.git
synced 2026-05-30 14:16:18 +00:00
Make clock visible on terminals without colours, from Manuel Einfalt in
GitHub issue 5001.
This commit is contained in:
@@ -282,6 +282,7 @@ window_clock_draw_screen(struct window_mode_entry *wme)
|
|||||||
memcpy(&gc, &grid_default_cell, sizeof gc);
|
memcpy(&gc, &grid_default_cell, sizeof gc);
|
||||||
gc.flags |= GRID_FLAG_NOPALETTE;
|
gc.flags |= GRID_FLAG_NOPALETTE;
|
||||||
gc.bg = colour;
|
gc.bg = colour;
|
||||||
|
gc.fg = colour;
|
||||||
for (ptr = tim; *ptr != '\0'; ptr++) {
|
for (ptr = tim; *ptr != '\0'; ptr++) {
|
||||||
if (*ptr >= '0' && *ptr <= '9')
|
if (*ptr >= '0' && *ptr <= '9')
|
||||||
idx = *ptr - '0';
|
idx = *ptr - '0';
|
||||||
@@ -302,7 +303,7 @@ window_clock_draw_screen(struct window_mode_entry *wme)
|
|||||||
for (i = 0; i < 5; i++) {
|
for (i = 0; i < 5; i++) {
|
||||||
screen_write_cursormove(&ctx, x + i, y + j, 0);
|
screen_write_cursormove(&ctx, x + i, y + j, 0);
|
||||||
if (window_clock_table[idx][j][i])
|
if (window_clock_table[idx][j][i])
|
||||||
screen_write_putc(&ctx, &gc, ' ');
|
screen_write_putc(&ctx, &gc, '#');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
x += 6;
|
x += 6;
|
||||||
|
|||||||
Reference in New Issue
Block a user