diff --git a/lib/util.c b/lib/util.c index a592b822f..ceace41f1 100644 --- a/lib/util.c +++ b/lib/util.c @@ -718,12 +718,12 @@ skip_numbers (const char *s) * "control sequence", in a sort of pidgin BNF, as follows: * * control-seq = Esc non-'[' - * | Esc '[' (0 or more digits or ';' or '?') (any other char) + * | Esc '[' (0 or more digits or ';' or ':' or '?') (any other char) + * + * The 256-color and true-color escape sequences should allow either ';' or ':' inside as separator, + * actually, ':' is the more correct according to ECMA-48. + * Some terminal emulators (e.g. xterm, gnome-terminal) support this. * - * This scheme works for all the terminals described in my termcap / - * terminfo databases, except the Hewlett-Packard 70092 and some Wyse - * terminals. If I hear from a single person who uses such a terminal - * with MC, I'll be glad to add support for it. (Dugan) * Non-printable characters are also removed. */ @@ -745,7 +745,7 @@ strip_ctrl_codes (char *s) if (*(++r) == '[' || *r == '(') { /* strchr() matches trailing binary 0 */ - while (*(++r) != '\0' && strchr ("0123456789;?", *r) != NULL) + while (*(++r) != '\0' && strchr ("0123456789;:?", *r) != NULL) ; } else if (*r == ']')