# HG changeset patch # User Kim Alvefur # Date 1680865258 -7200 # Node ID 9ddb344b9fab38ea6609048557baf213b682372c # Parent 83b93ad08b23400b3693f21599612679defe9e42 util.human.io: Allow defining per column ellipsis function As an alternative to doing it in the mapper function. Could be useful in cases where one may want to put the ellipsis in the middle or beginning instead of the start. diff -r 83b93ad08b23 -r 9ddb344b9fab util/human/io.lua --- a/util/human/io.lua Fri Apr 07 13:00:00 2023 +0200 +++ b/util/human/io.lua Fri Apr 07 13:00:58 2023 +0200 @@ -176,7 +176,7 @@ v = padright(v, width); end elseif len(v) > width then - v = ellipsis(v, width); + v = (column.ellipsis or ellipsis)(v, width); end table.insert(output, v); end