diff options
author | Matthew Wild <mwild1@gmail.com> | 2023-04-07 12:35:39 +0100 |
---|---|---|
committer | Matthew Wild <mwild1@gmail.com> | 2023-04-07 12:35:39 +0100 |
commit | b5ff6256b6ea968b77cd157fb55bdd0bd6e1ee3f (patch) | |
tree | 1366011e8088597eb8c9984d06a7db180fb7b935 | |
parent | 403acbb836688f57e184b57b77f073a51b0dc4eb (diff) | |
download | prosody-b5ff6256b6ea968b77cd157fb55bdd0bd6e1ee3f.tar.gz prosody-b5ff6256b6ea968b77cd157fb55bdd0bd6e1ee3f.zip |
util.human.io: table: use term_width() to discover terminal width
-rw-r--r-- | util/human/io.lua | 2 |
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 = {}; |