diff options
author | Kim Alvefur <zash@zash.se> | 2020-06-04 18:40:37 +0200 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2020-06-04 18:40:37 +0200 |
commit | f5a1f9a5559a25a5d7d47991d1619f2a1d617077 (patch) | |
tree | d4e10c5ac0293d6a264f750b57bfed8ac56124d3 /util/human | |
parent | 7dacb1176e6c042ea407b9973dfe9a7ecd32bda0 (diff) | |
download | prosody-f5a1f9a5559a25a5d7d47991d1619f2a1d617077.tar.gz prosody-f5a1f9a5559a25a5d7d47991d1619f2a1d617077.zip |
util.human.io: Consider separator when calculating remaining width
Diffstat (limited to 'util/human')
-rw-r--r-- | util/human/io.lua | 3 |
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 |