From 06450fb65b9c2053fb05b470272c86da1c0e6945 Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Sun, 9 Apr 2023 22:31:12 +0200 Subject: 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. --- util/human/io.lua | 3 --- 1 file changed, 3 deletions(-) (limited to 'util') 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 -- cgit v1.2.3