mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-04-03 07:15:29 -04:00
terminal: term_fill(): fix osc8 erase bug + handle styled underlines
Only clear OSC-8 hyperlinks at the target columns if we don't have an active OSC-8 URI. This corresponds to normal VT attributes; the currently active attributes are set, and all others are cleared. Handle styled underlines in the same way
This commit is contained in:
parent
963ce45f3f
commit
3b738c6e68
1 changed files with 16 additions and 2 deletions
18
terminal.c
18
terminal.c
|
|
@ -3636,11 +3636,25 @@ term_fill(struct terminal *term, int r, int c, uint8_t data, size_t count,
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (unlikely(term->vt.curly.style > CURLY_SINGLE ||
|
||||||
|
term->vt.curly.color_src != COLOR_DEFAULT))
|
||||||
|
{
|
||||||
|
grid_row_curly_range_put(row, c, term->vt.curly);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (unlikely(row->extra != NULL)) {
|
if (unlikely(row->extra != NULL)) {
|
||||||
grid_row_uri_range_erase(row, c, c + count - 1);
|
if (likely(term->vt.osc8.uri != NULL))
|
||||||
grid_row_curly_range_erase(row, c, c + count - 1);
|
grid_row_uri_range_erase(row, c, c + count - 1);
|
||||||
|
|
||||||
|
if (likely(term->vt.curly.style <= CURLY_SINGLE &&
|
||||||
|
term->vt.curly.color_src == COLOR_DEFAULT))
|
||||||
|
{
|
||||||
|
/* No extended/styled underlines active, so erase any such
|
||||||
|
attributes at the target columns */
|
||||||
|
grid_row_curly_range_erase(row, c, c + count - 1);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue