From 08c055709347b78e2fad5621dac247aa4a794fde Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Fri, 7 Apr 2023 13:02:20 +0200 Subject: util.human.io: Pass the whole column definition to mapper function I forget why I wanted this, but it may allow doing things like pull settings from the column, especially when the mapper function is reused among many columns. --- util/human/io.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'util/human') diff --git a/util/human/io.lua b/util/human/io.lua index b2318c0f..bfbabafb 100644 --- a/util/human/io.lua +++ b/util/human/io.lua @@ -162,7 +162,7 @@ local function new_table(col_specs, max_width) local width = widths[i]; local v = row[not titles and column.key or i]; if not titles and column.mapper then - v = column.mapper(v, row, width); + v = column.mapper(v, row, width, column); end if v == nil then v = column.default or ""; -- cgit v1.2.3