util.human.io: table: don't read $COLUMNS directly, just use term_width()
authorMatthew Wild <mwild1@gmail.com>
Fri, 07 Apr 2023 12:51:26 +0100
changeset 13053 115ce3ab5b8b
parent 13052 946442df65d3
child 13054 4ae759490e31
util.human.io: table: don't read $COLUMNS directly, just use term_width() ...which now reads $COLUMNS for us and does the right thing.
util/human/io.lua
--- a/util/human/io.lua	Fri Apr 07 12:47:24 2023 +0100
+++ b/util/human/io.lua	Fri Apr 07 12:51:26 2023 +0100
@@ -128,7 +128,7 @@
 end
 
 local function new_table(col_specs, max_width)
-	max_width = max_width or term_width(os.getenv("COLUMNS") or 80);
+	max_width = max_width or term_width(80);
 	local separator = " | ";
 
 	local widths = {};