aboutsummaryrefslogtreecommitdiff
path: root/terminal.h
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2021-02-14 20:29:22 +0000
committerDaniel Eklöf <daniel@ekloef.se>2021-02-21 19:15:32 +0000
commit2074f8b6563b7a6331c94a9231cd5b5af8bd7ade (patch)
tree19e61bff351d784e0f2959edd19239bf243fdb53 /terminal.h
parentgrid: refactor: break out allocation of ‘extra’ member to separate function (diff)
urls: OSC-8 URLs can now optionally be underlined outside of url-mode
This patch adds a new configuration option, ‘osc8-underline=url-mode|always’. When set to ‘url-mode’, OSC-8 URLs are only highlighted (i.e. underlined) in url-mode, just like auto-detected URLs. When set to ‘always’, they are always underlined, regardless of mode, and regardless of their other attributes. This is implemented by tagging collected URLs with a boolean, instructing urls_render() and urls_reset() whether they should update the cells’ ‘url’ attribute or not. The OSC-8 collecter sets this based on the value of ‘osc8-underline’. Finally, when closing an OSC-8 URL, the cells are immediately tagged with the ‘url’ attribute if ‘osc8-underline’ is set to ‘always’.
Diffstat (limited to 'terminal.h')
-rw-r--r--terminal.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/terminal.h b/terminal.h
index 7d6d0616..acff9d06 100644
--- a/terminal.h
+++ b/terminal.h
@@ -256,6 +256,7 @@ struct url {
struct coord start;
struct coord end;
enum url_action action;
+ bool url_mode_dont_change_url_attr; /* Entering/exiting URL mode doesn’t touch the cells’ attr.url */
};
typedef tll(struct url) url_list_t;