aboutsummaryrefslogtreecommitdiff
path: root/tty.c
diff options
context:
space:
mode:
authornicm <nicm>2022-03-24 09:05:57 +0000
committerNicholas Marriott <nicholas.marriott@gmail.com>2022-04-06 14:19:51 +0100
commit89a0046ad360d7a499732e327bae69b7e4b2536e (patch)
tree03ab2c55c4a70e18be56715ab86a9643690330b5 /tty.c
parent60a0a904e007390b8fba484eea9461bf095bff7a (diff)
downloadrtmux-89a0046ad360d7a499732e327bae69b7e4b2536e.tar.gz
rtmux-89a0046ad360d7a499732e327bae69b7e4b2536e.tar.bz2
rtmux-89a0046ad360d7a499732e327bae69b7e4b2536e.zip
Add a capability for OSC 7 and use it similarly to how the title is set
(and controlled by the same set-titles option). GitHub issue 3127.
Diffstat (limited to 'tty.c')
-rw-r--r--tty.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/tty.c b/tty.c
index 40735ceb..ea10e61e 100644
--- a/tty.c
+++ b/tty.c
@@ -655,6 +655,18 @@ tty_set_title(struct tty *tty, const char *title)
tty_putcode(tty, TTYC_FSL);
}
+void
+tty_set_path(struct tty *tty, const char *title)
+{
+ if (!tty_term_has(tty->term, TTYC_SWD) ||
+ !tty_term_has(tty->term, TTYC_FSL))
+ return;
+
+ tty_putcode(tty, TTYC_SWD);
+ tty_puts(tty, title);
+ tty_putcode(tty, TTYC_FSL);
+}
+
static void
tty_force_cursor_colour(struct tty *tty, int c)
{