aboutsummaryrefslogtreecommitdiffstats
path: root/builtin.c
diff options
context:
space:
mode:
Diffstat (limited to 'builtin.c')
-rw-r--r--builtin.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin.c b/builtin.c
index 724ea6df..1d841dc0 100644
--- a/builtin.c
+++ b/builtin.c
@@ -105,7 +105,7 @@ efwrite(const void *ptr,
if (fwrite(ptr, size, count, fp) != count)
goto wrerror;
if (flush
- && (output_is_tty
+ && ((fp == stdout && output_is_tty)
|| (rp != NULL && (rp->flag & RED_NOBUF)))) {
fflush(fp);
if (ferror(fp))