mirror of
https://github.com/tmux/tmux.git
synced 2025-09-01 20:57:00 +00:00
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).
This commit is contained in:
3
window.c
3
window.c
@ -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);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user