diff options
Diffstat (limited to 'usr.bin/tmux/tty.c')
-rw-r--r-- | usr.bin/tmux/tty.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/usr.bin/tmux/tty.c b/usr.bin/tmux/tty.c index d26af944bd6..d1fe3acce08 100644 --- a/usr.bin/tmux/tty.c +++ b/usr.bin/tmux/tty.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tty.c,v 1.104 2011/04/09 07:48:08 nicm Exp $ */ +/* $OpenBSD: tty.c,v 1.105 2011/05/08 19:53:08 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> @@ -369,14 +369,13 @@ tty_pututf8(struct tty *tty, const struct grid_utf8 *gu) void tty_set_title(struct tty *tty, const char *title) { - if (strstr(tty->termname, "xterm") == NULL && - strstr(tty->termname, "rxvt") == NULL && - strcmp(tty->termname, "screen") != 0) + if (!tty_term_has(tty->term, TTYC_TSL) || + !tty_term_has(tty->term, TTYC_FSL)) return; - tty_puts(tty, "\033]0;"); + tty_putcode(tty, TTYC_TSL); tty_puts(tty, title); - tty_putc(tty, '\007'); + tty_putcode(tty, TTYC_FSL); } void |