From 958d0b7fbc501d9b07b13265c92378dfd8dd9832 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Thu, 12 Oct 2023 23:15:06 +0200 Subject: [PATCH] libsmartcols: always print vertical symbol Signed-off-by: Karel Zak --- libsmartcols/src/print.c | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) diff --git a/libsmartcols/src/print.c b/libsmartcols/src/print.c index c0b5c5258a..6f2cb5abc4 100644 --- a/libsmartcols/src/print.c +++ b/libsmartcols/src/print.c @@ -232,21 +232,6 @@ static int groups_ascii_art_to_buffer( struct libscols_table *tb, return 0; } -static int has_pending_data(struct libscols_table *tb) -{ - struct libscols_column *cl; - struct libscols_iter itr; - - scols_reset_iter(&itr, SCOLS_ITER_FORWARD); - while (scols_table_next_column(tb, &itr, &cl) == 0) { - if (scols_column_is_hidden(cl)) - continue; - if (scols_column_has_pending_wrap(cl)) - return 1; - } - return 0; -} - static void fputs_color_reset(struct libscols_table *tb) { if (tb->cur_color) { @@ -349,7 +334,7 @@ static void print_empty_cell(struct libscols_table *tb, tree_ascii_art_to_buffer(tb, ln, &art); - if (!list_empty(&ln->ln_branch) && has_pending_data(tb)) + if (!list_empty(&ln->ln_branch)) ul_buffer_append_string(&art, vertical_symbol(tb)); if (scols_table_is_noencoding(tb)) -- 2.47.3