Software /
code /
prosody
Diff
util/human/io.lua @ 13068:7a75cbc4d87c
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.
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sun, 09 Apr 2023 22:31:12 +0200 |
parent | 13067:386ca97bec5b |
child | 13199:278920294dfe |
line wrap: on
line diff
--- a/util/human/io.lua Sun Apr 09 01:34:08 2023 +0200 +++ b/util/human/io.lua Sun Apr 09 22:31:12 2023 +0200 @@ -142,9 +142,6 @@ 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