term: term_fill(): only set OSC-8 + styled hyperlinks when use_sgr_attrs is set

This commit is contained in:
Daniel Eklöf 2024-06-24 01:09:24 +02:00
parent 3b738c6e68
commit 22302d8bcc
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F

View file

@ -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);
}