summaryrefslogtreecommitdiff
path: root/libsmartcols
diff options
context:
space:
mode:
authorKarel Zak <kzak@redhat.com>2016-02-22 10:43:25 +0100
committerKarel Zak <kzak@redhat.com>2016-02-22 10:43:25 +0100
commit334e5eba9ee01357ca8275708711881fd9fbc99b (patch)
tree8abbc036f46189f1cbf2a084e9b050c419b0ffbd /libsmartcols
parent96592b4902ca9b5672998da4c8fdf4968224def3 (diff)
downloadutil-linux-334e5eba9ee01357ca8275708711881fd9fbc99b.tar.gz
libsmartcols: fix scols_table_print_range() to print header
References: https://github.com/karelzak/util-linux/issues/287 Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'libsmartcols')
-rw-r--r--libsmartcols/src/table_print.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libsmartcols/src/table_print.c b/libsmartcols/src/table_print.c
index f65cce383..d6622be64 100644
--- a/libsmartcols/src/table_print.c
+++ b/libsmartcols/src/table_print.c
@@ -1339,7 +1339,7 @@ int scols_table_print_range( struct libscols_table *tb,
} else
scols_reset_iter(&itr, SCOLS_ITER_FORWARD);
- if (itr.p == tb->tb_lines.next) {
+ if (!start || itr.p == tb->tb_lines.next) {
rc = print_header(tb, buf);
if (rc)
goto done;