diff options
author | nicm <nicm> | 2017-06-04 09:02:36 +0000 |
---|---|---|
committer | nicm <nicm> | 2017-06-04 09:02:36 +0000 |
commit | 8149bc3fa6e93cb083b165a21baa5ec07dd473dc (patch) | |
tree | 1192f61bf7b49276ef6dc1a6c62c6d5d20566036 /screen.c | |
parent | adf5628087829bed2eff635760d7cc456dd1e558 (diff) | |
download | rtmux-8149bc3fa6e93cb083b165a21baa5ec07dd473dc.tar.gz rtmux-8149bc3fa6e93cb083b165a21baa5ec07dd473dc.tar.bz2 rtmux-8149bc3fa6e93cb083b165a21baa5ec07dd473dc.zip |
Be more strict about escape sequences that rename windows or set titles:
ignore any that not valid UTF-8 outright, and for good measure pass the
result through our UTF-8-aware vis(3).
Diffstat (limited to 'screen.c')
-rw-r--r-- | screen.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -21,6 +21,7 @@ #include <stdlib.h> #include <string.h> #include <unistd.h> +#include <vis.h> #include "tmux.h" @@ -107,7 +108,7 @@ void screen_set_title(struct screen *s, const char *title) { free(s->title); - s->title = xstrdup(title); + utf8_stravis(&s->title, title, VIS_OCTAL|VIS_CSTYLE|VIS_TAB|VIS_NL); } /* Resize screen. */ |