aboutsummaryrefslogtreecommitdiffstats
path: root/util/human
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2023-04-09 22:31:12 +0200
committerKim Alvefur <zash@zash.se>2023-04-09 22:31:12 +0200
commit06450fb65b9c2053fb05b470272c86da1c0e6945 (patch)
treebe34076ce6e9ba2eed592c9b41534eb0d2e84e3f /util/human
parent7100d588280a514857e9e801b6a1bb6003b5d46a (diff)
downloadprosody-06450fb65b9c2053fb05b470272c86da1c0e6945.tar.gz
prosody-06450fb65b9c2053fb05b470272c86da1c0e6945.zip
util.human.io: Fix column width miscalculation
Fixes that the more fixed width columns there are, the narrower the resulting table becomes. A right-aligned variable-width column at the last position should always be flush to the right side of the terminal.
Diffstat (limited to 'util/human')
-rw-r--r--util/human/io.lua3
1 files changed, 0 insertions, 3 deletions
diff --git a/util/human/io.lua b/util/human/io.lua
index bd499664..5049f244 100644
--- a/util/human/io.lua
+++ b/util/human/io.lua
@@ -142,9 +142,6 @@ local function new_table(col_specs, max_width)
width = math.max(tonumber(width), title and (#title+1) or 0);
widths[i] = width;
free_width = free_width - width;
- if i > 1 then
- free_width = free_width - #separator;
- end
end
end