aboutsummaryrefslogtreecommitdiffstats
path: root/util
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2023-04-07 12:35:39 +0100
committerMatthew Wild <mwild1@gmail.com>2023-04-07 12:35:39 +0100
commitb5ff6256b6ea968b77cd157fb55bdd0bd6e1ee3f (patch)
tree1366011e8088597eb8c9984d06a7db180fb7b935 /util
parent403acbb836688f57e184b57b77f073a51b0dc4eb (diff)
downloadprosody-b5ff6256b6ea968b77cd157fb55bdd0bd6e1ee3f.tar.gz
prosody-b5ff6256b6ea968b77cd157fb55bdd0bd6e1ee3f.zip
util.human.io: table: use term_width() to discover terminal width
Diffstat (limited to 'util')
-rw-r--r--util/human/io.lua2
1 files changed, 1 insertions, 1 deletions
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 = {};