summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--NEWS1
-rw-r--r--src/watch.c5
2 files changed, 5 insertions, 1 deletions
diff --git a/NEWS b/NEWS
index c319ad5..0c473c7 100644
--- a/NEWS
+++ b/NEWS
@@ -10,6 +10,7 @@ procps-ng-NEXT
* w: Add --pids option merge #159
* watch: Pass through beep issue #104
* watch: -r option to not re-exec on SIGWINCH merge #125
+ * watch: find eol with --no-linewrap merge #157
procps-ng-4.0.2
---------------
diff --git a/src/watch.c b/src/watch.c
index b7ad005..f9a152d 100644
--- a/src/watch.c
+++ b/src/watch.c
@@ -774,8 +774,11 @@ static int run_command(char *restrict command, char **restrict command_argv)
reset_ansi();
if (flags & WATCH_COLOR)
attrset(A_NORMAL);
- find_eol(p);
}
+ if (!line_wrap && !eolseen)
+ {
+ find_eol(p);
+ }
}
fclose(p);