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>
This commit is contained in:
Karel Zak 2016-02-22 10:43:25 +01:00
parent 96592b4902
commit 334e5eba9e
1 changed files with 1 additions and 1 deletions

View File

@ -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;