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
screen.c
3
screen.c
@ -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. */
|
||||
|
Reference in New Issue
Block a user