mirror of
https://github.com/tmux/tmux.git
synced 2026-05-30 14:16:18 +00:00
Sanitize pane titles and window and session names more consistently and
strictly, prevents C0 characters and other nonvisible characters causing problems. Reported (with a different fix) by Chris Monardo in GitHub issue 4999.
This commit is contained in:
11
window.c
11
window.c
@@ -408,9 +408,14 @@ window_remove_ref(struct window *w, const char *from)
|
||||
void
|
||||
window_set_name(struct window *w, const char *new_name)
|
||||
{
|
||||
free(w->name);
|
||||
utf8_stravis(&w->name, new_name, VIS_OCTAL|VIS_CSTYLE|VIS_TAB|VIS_NL);
|
||||
notify_window("window-renamed", w);
|
||||
char *name;
|
||||
|
||||
name = clean_name(new_name, "#");
|
||||
if (name != NULL) {
|
||||
free(w->name);
|
||||
utf8_stravis(&w->name, new_name, VIS_OCTAL|VIS_CSTYLE|VIS_TAB|VIS_NL);
|
||||
notify_window("window-renamed", w);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
Reference in New Issue
Block a user