mirror of
https://github.com/tmux/tmux.git
synced 2025-09-02 21:56:57 +00:00
Set window title to current session. New options set-titles to disable.
This commit is contained in:
12
tty.c
12
tty.c
@ -1,4 +1,4 @@
|
||||
/* $Id: tty.c,v 1.23 2008-06-10 18:51:22 nicm Exp $ */
|
||||
/* $Id: tty.c,v 1.24 2008-06-18 18:52:44 nicm Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
|
||||
@ -342,6 +342,14 @@ tty_putc(struct tty *tty, char ch)
|
||||
buffer_write8(tty->out, ch);
|
||||
}
|
||||
|
||||
void
|
||||
tty_set_title(struct tty *tty, const char *title)
|
||||
{
|
||||
tty_puts(tty, "\e]0;");
|
||||
tty_puts(tty, title);
|
||||
tty_putc(tty, '\007');
|
||||
}
|
||||
|
||||
void
|
||||
tty_vwrite(struct tty *tty, struct screen *s, int cmd, va_list ap)
|
||||
{
|
||||
@ -544,8 +552,6 @@ tty_vwrite(struct tty *tty, struct screen *s, int cmd, va_list ap)
|
||||
if (key_mouse != NULL)
|
||||
tty_puts(tty, "\e[?1000h");
|
||||
break;
|
||||
case TTY_TITLE:
|
||||
break;
|
||||
case TTY_ATTRIBUTES:
|
||||
ua = va_arg(ap, u_int);
|
||||
ub = va_arg(ap, u_int);
|
||||
|
Reference in New Issue
Block a user