From: Jaromir Capik Date: Mon, 8 Sep 2014 16:28:08 +0000 (+0200) Subject: watch: avoid ansi manipulations in non-ansi mode X-Git-Tag: v3.3.10~9^2~2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=eae9b671c034e3ab112c805f421a12db767e6a86;p=procps-ng watch: avoid ansi manipulations in non-ansi mode --- diff --git a/watch.c b/watch.c index 5c177a28..c6ef3892 100644 --- a/watch.c +++ b/watch.c @@ -474,7 +474,8 @@ static int run_command(char *restrict command, char **restrict command_argv) reset_ansi(); for (y = show_title; y < height; y++) { int eolseen = 0, tabpending = 0, tabwaspending = 0; - set_ansi_attribute(-1); + if (flags & WATCH_COLOR) + set_ansi_attribute(-1); #ifdef WITH_WATCH8BIT wint_t carry = WEOF; #endif