config: add url.style=none|single|double|curly|dotted|dashed

This option allows you to configure which underline style to use with
URLs.

The default is dotted. Since before this patch, URL underlines were
always plain underlines, this means the default URL underline style
has changed, from single to dotted.

Closes #2302
This commit is contained in:
Daniel Eklöf 2026-04-06 15:47:26 +02:00
parent ecf3b864e4
commit 2c454a71f1
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F
8 changed files with 50 additions and 11 deletions

View file

@ -1171,13 +1171,16 @@ render_cell(struct terminal *term, pixman_image_t *pix,
if (cell->attrs.strikethrough)
draw_strikeout(term, pix, font, &fg, x, y, cell_cols);
if (unlikely(cell->attrs.url)) {
if (unlikely(cell->attrs.url && term->conf->url.style != UNDERLINE_NONE)) {
pixman_color_t url_color = color_hex_to_pixman(
term->conf->colors_dark.use_custom.url
? term->conf->colors_dark.url
: term->colors.table[3],
gamma_correct);
draw_underline(term, pix, font, &url_color, x, y, cell_cols);
draw_styled_underline(
term, pix, font, &url_color, term->conf->url.style,
x, y, cell_cols);
}
draw_cursor: