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 | 4e554bc4d156354ce835ae92fa0184504c77b61e (patch) | |
tree | d4e10c5ac0293d6a264f750b57bfed8ac56124d3 /util/human/io.lua | |
parent | 87777b26af1c1c63f90e1e0e8f9f3c18490322c1 (diff) | |
download | prosody-4e554bc4d156354ce835ae92fa0184504c77b61e.tar.gz prosody-4e554bc4d156354ce835ae92fa0184504c77b61e.zip |
util.human.io: Consider separator when calculating remaining width
Diffstat (limited to 'util/human/io.lua')
-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 |