# HG changeset patch # User Kim Alvefur # Date 1680865200 -7200 # Node ID 83b93ad08b23400b3693f21599612679defe9e42 # Parent 635ed9a362ee5273a81832060406ffdbac738875 util.human.io: Pass expected width to mapper function In order to allow it to adjust its output to available space, apply its own ellipsis method or other compacting method. diff -r 635ed9a362ee -r 83b93ad08b23 util/human/io.lua --- a/util/human/io.lua Fri Apr 07 12:58:02 2023 +0200 +++ b/util/human/io.lua Fri Apr 07 13:00:00 2023 +0200 @@ -162,7 +162,7 @@ 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); + v = column.mapper(v, row, width); end if v == nil then v = column.default or "";