From b5ff6256b6ea968b77cd157fb55bdd0bd6e1ee3f Mon Sep 17 00:00:00 2001 From: Matthew Wild Date: Fri, 7 Apr 2023 12:35:39 +0100 Subject: util.human.io: table: use term_width() to discover terminal width --- util/human/io.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'util') diff --git a/util/human/io.lua b/util/human/io.lua index 8a162059..51a95ed5 100644 --- a/util/human/io.lua +++ b/util/human/io.lua @@ -126,7 +126,7 @@ local function ellipsis(s, width) end local function new_table(col_specs, max_width) - max_width = max_width or tonumber(os.getenv("COLUMNS")) or 80; + max_width = max_width or term_width(os.getenv("COLUMNS") or 80); local separator = " | "; local widths = {}; -- cgit v1.2.3