aboutsummaryrefslogtreecommitdiff
path: root/column.c
diff options
context:
space:
mode:
Diffstat (limited to 'column.c')
-rw-r--r--column.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/column.c b/column.c
index ff7bdab1a..ded50337f 100644
--- a/column.c
+++ b/column.c
@@ -5,6 +5,7 @@
#include "parse-options.h"
#include "run-command.h"
#include "utf8.h"
+#include "pager.c"
#define XY2LINEAR(d, x, y) (COL_LAYOUT((d)->colopts) == COL_COLUMN ? \
(x) * (d)->rows + (y) : \
@@ -224,7 +225,7 @@ int finalize_colopts(unsigned int *colopts, int stdout_is_tty)
if (stdout_is_tty < 0)
stdout_is_tty = isatty(1);
*colopts &= ~COL_ENABLE_MASK;
- if (stdout_is_tty)
+ if (stdout_is_tty || pager_in_use())
*colopts |= COL_ENABLED;
}
return 0;