From 96899dc527999ee9130246eec86d76d79b1a8d97 Mon Sep 17 00:00:00 2001 From: nicm Date: Sun, 28 Jun 2026 15:53:18 +0000 Subject: [PATCH] Only forbid #( in names and titles (styles are #[ and are useful). --- tmux.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tmux.c b/tmux.c index bc018da88..7236360bb 100644 --- a/tmux.c +++ b/tmux.c @@ -295,7 +295,10 @@ clean_name(const char *name, const char* forbid) return (NULL); copy = xstrdup(name); 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 = '_'; } utf8_stravis(&new_name, copy, VIS_OCTAL|VIS_CSTYLE|VIS_TAB|VIS_NL);