aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2024-06-23 23:09:24 +0000
committerDaniel Eklöf <daniel@ekloef.se>2024-06-26 16:39:24 +0000
commit22302d8bccaa76aef9b9dca97ebc35b4ed37afff (patch)
tree39794af8490411620ee2e294790e1e2aa364cd40
parentterminal: term_fill(): fix osc8 erase bug + handle styled underlines (diff)
term: term_fill(): only set OSC-8 + styled hyperlinks when use_sgr_attrs is set
-rw-r--r--terminal.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/terminal.c b/terminal.c
index 771e4878..ecd55d77 100644
--- a/terminal.c
+++ b/terminal.c
@@ -3624,7 +3624,7 @@ term_fill(struct terminal *term, int r, int c, uint8_t data, size_t count,
cell->attrs = attrs;
/* TODO: why do we print the URI here, and then erase it below? */
- if (unlikely(term->vt.osc8.uri != NULL)) {
+ if (unlikely(use_sgr_attrs && term->vt.osc8.uri != NULL)) {
grid_row_uri_range_put(row, c, term->vt.osc8.uri, term->vt.osc8.id);
switch (term->conf->url.osc8_underline) {
@@ -3637,8 +3637,9 @@ term_fill(struct terminal *term, int r, int c, uint8_t data, size_t count,
}
}
- if (unlikely(term->vt.curly.style > CURLY_SINGLE ||
- term->vt.curly.color_src != COLOR_DEFAULT))
+ if (unlikely(use_sgr_attrs &&
+ (term->vt.curly.style > CURLY_SINGLE ||
+ term->vt.curly.color_src != COLOR_DEFAULT)))
{
grid_row_curly_range_put(row, c, term->vt.curly);
}