From: albert <> Date: Thu, 28 Nov 2002 19:47:16 +0000 (+0000) Subject: watch 'echo -e "A\n\nB"' X-Git-Tag: v3.3.0~344 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=bc60aa667d2c61b09ebe5bbe024d634ce9811dd9;p=procps-ng watch 'echo -e "A\n\nB"' --- diff --git a/watch.c b/watch.c index 89dfd565..5a6df452 100644 --- a/watch.c +++ b/watch.c @@ -196,6 +196,7 @@ main(int argc, char *argv[]) char *header; FILE *p; int x, y; + int oldeolseen = 1; if (screen_size_changed) { @@ -240,7 +241,7 @@ main(int argc, char *argv[]) c = getc(p); while (c != EOF && !isprint(c) && c != '\n' && c != '\t'); if (c == '\n') - if (x == 0) { + if (!oldeolseen && x == 0) { x=-1; continue; } else @@ -268,6 +269,7 @@ main(int argc, char *argv[]) if (attr) standend(); } + oldeolseen = eolseen; } pclose(p);