mirror of
https://github.com/tmux/tmux.git
synced 2026-10-11 13:04:22 +00:00
Only forbid #( in names and titles (styles are #[ and are useful).
This commit is contained in:
5
tmux.c
5
tmux.c
@@ -295,7 +295,10 @@ clean_name(const char *name, const char* forbid)
|
|||||||
return (NULL);
|
return (NULL);
|
||||||
copy = xstrdup(name);
|
copy = xstrdup(name);
|
||||||
for (cp = copy; *cp != '\0'; cp++) {
|
for (cp = copy; *cp != '\0'; cp++) {
|
||||||
if (strchr(forbid, *cp) != NULL)
|
if (*cp == '#' && strchr(forbid, '#') != NULL) {
|
||||||
|
if (cp[1] == '(')
|
||||||
|
*cp = '_';
|
||||||
|
} else if (strchr(forbid, *cp) != NULL)
|
||||||
*cp = '_';
|
*cp = '_';
|
||||||
}
|
}
|
||||||
utf8_stravis(&new_name, copy, VIS_OCTAL|VIS_CSTYLE|VIS_TAB|VIS_NL);
|
utf8_stravis(&new_name, copy, VIS_OCTAL|VIS_CSTYLE|VIS_TAB|VIS_NL);
|
||||||
|
|||||||
Reference in New Issue
Block a user