diff --git a/src/basic/ansi-color.h b/src/basic/ansi-color.h index d8620c0f52..c9348cad25 100644 --- a/src/basic/ansi-color.h +++ b/src/basic/ansi-color.h @@ -49,7 +49,7 @@ bool looks_like_ansi_color_code(const char *str); #define ANSI_BRIGHT_CYAN "\x1B[0;96m" #define ANSI_BRIGHT_WHITE "\x1B[0;97m" -#define ANSI_GREY "\x1B[0;38;5;245m" +#define ANSI_GREY "\x1B[0;38:5:245m" /* Bold/highlighted */ #define ANSI_HIGHLIGHT_BLACK "\x1B[0;1;30m" diff --git a/src/basic/string-util.c b/src/basic/string-util.c index 0c5c0a6287..ecd0277577 100644 --- a/src/basic/string-util.c +++ b/src/basic/string-util.c @@ -735,7 +735,7 @@ char* strip_tab_ansi(char **ibuf, size_t *_isz, size_t highlight[2]) { case STATE_CSI: assert(n_carriage_returns == 0); - if (eot || !strchr("01234567890;m", *i)) { /* EOT or invalid chars in sequence */ + if (eot || !strchr(DIGITS ";:m", *i)) { /* EOT or invalid chars in sequence */ fputc('\x1B', f); fputc('[', f); advance_offsets(i - *ibuf, highlight, shift, 2);