aboutsummaryrefslogtreecommitdiffstats
path: root/util
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2020-06-04 18:40:37 +0200
committerKim Alvefur <zash@zash.se>2020-06-04 18:40:37 +0200
commitf5a1f9a5559a25a5d7d47991d1619f2a1d617077 (patch)
treed4e10c5ac0293d6a264f750b57bfed8ac56124d3 /util
parent7dacb1176e6c042ea407b9973dfe9a7ecd32bda0 (diff)
downloadprosody-f5a1f9a5559a25a5d7d47991d1619f2a1d617077.tar.gz
prosody-f5a1f9a5559a25a5d7d47991d1619f2a1d617077.zip
util.human.io: Consider separator when calculating remaining width
Diffstat (limited to 'util')
-rw-r--r--util/human/io.lua3
1 files changed, 3 insertions, 0 deletions
diff --git a/util/human/io.lua b/util/human/io.lua
index 8d987355..76553fac 100644
--- a/util/human/io.lua
+++ b/util/human/io.lua
@@ -110,6 +110,9 @@ 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
-- Calculate width of %-based columns