diff options
Diffstat (limited to 'usr.bin/tmux/screen.c')
-rw-r--r-- | usr.bin/tmux/screen.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/usr.bin/tmux/screen.c b/usr.bin/tmux/screen.c index 028653b56c4..da7763a805f 100644 --- a/usr.bin/tmux/screen.c +++ b/usr.bin/tmux/screen.c @@ -1,4 +1,4 @@ -/* $OpenBSD: screen.c,v 1.1 2009/06/01 22:58:49 nicm Exp $ */ +/* $OpenBSD: screen.c,v 1.2 2009/06/03 19:33:04 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> @@ -19,6 +19,7 @@ #include <sys/types.h> #include <string.h> +#include <vis.h> #include "tmux.h" @@ -65,8 +66,12 @@ screen_free(struct screen *s) void screen_set_title(struct screen *s, const char *title) { + char tmp[BUFSIZ]; + + strnvis(tmp, title, sizeof tmp, VIS_OCTAL|VIS_TAB|VIS_NL); + xfree(s->title); - s->title = xstrdup(title); + s->title = xstrdup(tmp); } /* Resize screen. */ |