diff options
author | Kim Alvefur <zash@zash.se> | 2023-04-09 22:31:12 +0200 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2023-04-09 22:31:12 +0200 |
commit | 06450fb65b9c2053fb05b470272c86da1c0e6945 (patch) | |
tree | be34076ce6e9ba2eed592c9b41534eb0d2e84e3f | |
parent | 7100d588280a514857e9e801b6a1bb6003b5d46a (diff) | |
download | prosody-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.
-rw-r--r-- | util/human/io.lua | 3 |
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 |