aboutsummaryrefslogtreecommitdiff
path: root/screen.c
diff options
context:
space:
mode:
Diffstat (limited to 'screen.c')
-rw-r--r--screen.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/screen.c b/screen.c
index 4b355115..53b17bce 100644
--- a/screen.c
+++ b/screen.c
@@ -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. */