diff options
author | nicm <nicm> | 2022-03-24 09:05:57 +0000 |
---|---|---|
committer | nicm <nicm> | 2022-03-24 09:05:57 +0000 |
commit | 792d13af49f2550a9a8d11b0099528628957a1a0 (patch) | |
tree | 055dafc23a9ceb88e92a34ac67ad7cb70c7aca7b /tty.c | |
parent | 6a1706a62fb2442326cd37d84ff8b0d39bf0b7a6 (diff) | |
download | rtmux-792d13af49f2550a9a8d11b0099528628957a1a0.tar.gz rtmux-792d13af49f2550a9a8d11b0099528628957a1a0.tar.bz2 rtmux-792d13af49f2550a9a8d11b0099528628957a1a0.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.c | 12 |
1 files changed, 12 insertions, 0 deletions
@@ -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) { |