]> granicus.if.org Git - procps-ng/commitdiff
Don't check if output changed on first screen.
authorKent R. Spillner <kspillner@acm.org>
Sun, 11 Mar 2012 15:14:27 +0000 (10:14 -0500)
committerKent R. Spillner <kspillner@acm.org>
Sun, 11 Mar 2012 15:14:27 +0000 (10:14 -0500)
When invoked with the --chgexit/-g options wait until we have at
least one screen of output before checking if the output changed.
Otherwise, we're comparing the initial screen of output to all
spaces, which usually isn't what we want.

watch.c

diff --git a/watch.c b/watch.c
index e3066f6ffcb68bc896068cad0895fe9a321a39c7..6ce174ba4d04aad1d01352f576914d4bdf42405a 100644 (file)
--- a/watch.c
+++ b/watch.c
@@ -657,7 +657,7 @@ int main(int argc, char *argv[])
                                                tabpending = 0;
                                }
                                move(y, x);
-                               if (!exit_early && option_chgexit) {
+                               if (!first_screen && !exit_early && option_chgexit) {
 #ifdef WITH_WATCH8BIT
                                        cchar_t oldc;
                                        in_wch(&oldc);