aboutsummaryrefslogtreecommitdiff
path: root/osc.c
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2019-08-21 16:50:24 +0000
committerDaniel Eklöf <daniel@ekloef.se>2019-08-21 16:50:24 +0000
commitd8fb80ea32d3054ea0455b841e60677c86470fbb (patch)
treef61283b05352ea871362d6690a3944b502621570 /osc.c
parentterm: use colors256 array for *all* colors (diff)
term: rename colors256 -> table
Diffstat (limited to 'osc.c')
-rw-r--r--osc.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/osc.c b/osc.c
index 2fd1e08f..b2f8159e 100644
--- a/osc.c
+++ b/osc.c
@@ -291,7 +291,7 @@ osc_dispatch(struct terminal *term)
/* Client queried for current value */
if (strlen(string) == 1 && string[0] == '?') {
- uint32_t color = term->colors.colors256[idx];
+ uint32_t color = term->colors.table[idx];
uint8_t r = (color >> 16) & 0xff;
uint8_t g = (color >> 8) & 0xff;
uint8_t b = (color >> 0) & 0xff;
@@ -307,7 +307,7 @@ osc_dispatch(struct terminal *term)
if (!parse_rgb(string, &color))
break;
- term->colors.colors256[idx] = color;
+ term->colors.table[idx] = color;
render_refresh(term);
break;
}
@@ -364,14 +364,14 @@ osc_dispatch(struct terminal *term)
if (strlen(string) == 0) {
for (size_t i = 0; i < 256; i++)
- term->colors.colors256[i] = term->colors.default_colors256[i];
+ term->colors.table[i] = term->colors.default_table[i];
} else {
unsigned idx = 0;
for (; *string != '\0'; string++) {
char c = *string;
if (c == ';') {
- term->colors.colors256[idx] = term->colors.default_colors256[idx];
+ term->colors.table[idx] = term->colors.default_table[idx];
idx = 0;
continue;
}
@@ -380,7 +380,7 @@ osc_dispatch(struct terminal *term)
idx += c - '0';
}
- term->colors.colors256[idx] = term->colors.default_colors256[idx];
+ term->colors.table[idx] = term->colors.default_table[idx];
}
render_refresh(term);