aboutsummaryrefslogtreecommitdiff
path: root/terminal.h
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2021-05-22 14:42:43 +0000
committerDaniel Eklöf <daniel@ekloef.se>2021-05-22 14:42:43 +0000
commit5605eb90405f732019043990cd39f1fd96e72182 (patch)
tree6591314d70069593683edae49e5d2fb034461d4a /terminal.h
parentMerge branch 'configurable-protocols-to-match-in-url-mode' (diff)
url-mode: remove overlapping URLs, not just duplicates
echo -e '\e]8;;https://www.foo.bar\e\\https://www.foo\e]8;;\e\\.bar' will produce an OSC-8 URL (https://www.foo) that is slightly shorter than the auto-detected one (https://www.foo.bar). This produces strange results in URL mode. For example, if url.osc8-underline=always, the OSC8 underline will be removed when url-mode is exited. This patch changes the behavior so that auto-detected URLs that overlap OSC-8 URLs are removed. Note that OSC-8 URLs cannot overlap with each other, and that auto-detected URLs also cannot overlap with each other.
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 472b4938..1721a4c1 100644
--- a/terminal.h
+++ b/terminal.h
@@ -258,6 +258,7 @@ struct url {
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 */
+ bool osc8;
};
typedef tll(struct url) url_list_t;