aboutsummaryrefslogtreecommitdiff
path: root/osc.c
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2021-11-20 15:29:57 +0000
committerDaniel Eklöf <daniel@ekloef.se>2021-11-20 15:46:38 +0000
commitd46af6bd7ac7606bf99d63b2453b656a5defb892 (patch)
treea099410b3169c2fd37e85a1588a65f058911f371 /osc.c
parentci: one more text-shaping -> grapheme-shaping+run-shaping (diff)
term: track cell color source
Each cell now tracks it’s current color source: * default fg/bg * base16 fg/bg (maps to *both* the regular and bright colors) * base256 fg/bg * RGB Note that we don’t have enough bits to separate the regular from the bright colors. These _shouldn’t_ be the same, so we ought to be fine...
Diffstat (limited to 'osc.c')
-rw-r--r--osc.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/osc.c b/osc.c
index ecb908ca..910c1e02 100644
--- a/osc.c
+++ b/osc.c
@@ -503,7 +503,7 @@ osc_notify(struct terminal *term, char *string)
* (https://pub.phyks.me/scripts/urxvt/notify) is very simple:
*
* #!/usr/bin/perl
- *
+ *
* sub on_osc_seq_perl {
* my ($term, $osc, $resp) = @_;
* if ($osc =~ /^notify;(\S+);(.*)$/) {
@@ -560,7 +560,7 @@ update_color_in_grids(struct terminal *term, uint32_t old_color,
for (size_t c = 0; c < term->grid->num_cols; c++) {
struct cell *cell = &row->cells[c];
- if (cell->attrs.have_fg &&
+ if (cell->attrs.fg_src != COLOR_DEFAULT &&
cell->attrs.fg == old_color)
{
cell->attrs.fg = new_color;
@@ -568,7 +568,7 @@ update_color_in_grids(struct terminal *term, uint32_t old_color,
row->dirty = true;
}
- if ( cell->attrs.have_bg &&
+ if (cell->attrs.bg_src != COLOR_DEFAULT &&
cell->attrs.bg == old_color)
{
cell->attrs.bg = new_color;