diff options
author | Thomas Adam <thomas@xteddy.org> | 2022-06-30 16:37:18 +0100 |
---|---|---|
committer | Thomas Adam <thomas@xteddy.org> | 2022-06-30 16:37:18 +0100 |
commit | 01c4919f5f86d7c120451ae642e722ea7d9651d7 (patch) | |
tree | 588d4883507ab85ad5e51181a548346da7c86c20 /tty-features.c | |
parent | d8c527a5f9fc06ea15a7d04f3a54a9e49cebae62 (diff) | |
parent | cdacc12ce305ad2f3e65e2a01328a988e3200b51 (diff) | |
download | rtmux-01c4919f5f86d7c120451ae642e722ea7d9651d7.tar.gz rtmux-01c4919f5f86d7c120451ae642e722ea7d9651d7.tar.bz2 rtmux-01c4919f5f86d7c120451ae642e722ea7d9651d7.zip |
Merge branch 'obsd-master'
Diffstat (limited to 'tty-features.c')
-rw-r--r-- | tty-features.c | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/tty-features.c b/tty-features.c index 477925e3..396a351e 100644 --- a/tty-features.c +++ b/tty-features.c @@ -87,6 +87,17 @@ static const struct tty_feature tty_feature_clipboard = { 0 }; +/* Terminal supports OSC 8 hyperlinks. */ +static const char *tty_feature_hyperlinks_capabilities[] = { + "*:Hls=\\E]8;%?%p1%l%tid=%p1%s%;;%p2%s\\E\\\\", + NULL +}; +static const struct tty_feature tty_feature_hyperlinks = { + "hyperlinks", + tty_feature_hyperlinks_capabilities, + 0 +}; + /* * Terminal supports RGB colour. This replaces setab and setaf also since * terminals with RGB have versions that do not allow setting colours from the @@ -330,6 +341,7 @@ static const struct tty_feature *tty_features[] = { &tty_feature_bpaste, &tty_feature_ccolour, &tty_feature_clipboard, + &tty_feature_hyperlinks, &tty_feature_cstyle, &tty_feature_extkeys, &tty_feature_focus, @@ -444,14 +456,14 @@ tty_default_features(int *feat, const char *name, u_int version) }, { .name = "tmux", .features = TTY_FEATURES_BASE_MODERN_XTERM - ",ccolour,cstyle,focus,overline,usstyle" + ",ccolour,cstyle,focus,overline,usstyle,hyperlinks" }, { .name = "rxvt-unicode", .features = "256,bpaste,ccolour,cstyle,mouse,title,ignorefkeys" }, { .name = "iTerm2", .features = TTY_FEATURES_BASE_MODERN_XTERM - ",cstyle,extkeys,margins,usstyle,sync,osc7" + ",cstyle,extkeys,margins,usstyle,sync,osc7,hyperlinks" }, { .name = "XTerm", /* |