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 /window.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 'window.c')
-rw-r--r-- | window.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -29,6 +29,7 @@ #include <time.h> #include <unistd.h> #include <util.h> +#include <vis.h> #include "tmux.h" @@ -408,7 +409,7 @@ void window_set_name(struct window *w, const char *new_name) { free(w->name); - w->name = xstrdup(new_name); + utf8_stravis(&w->name, new_name, VIS_OCTAL|VIS_CSTYLE|VIS_TAB|VIS_NL); notify_window("window-renamed", w); } |