# HG changeset patch # User Kim Alvefur # Date 1680996848 -7200 # Node ID 386ca97bec5b0e7c3d653f6f687683dd2b921987 # Parent 4aa4a51a7a779080ec62cd541c7873380ce5508a util.human.io: Fix error with ellipsis to negative length Can happen if you resize the terminal too narrow that the space left for variable width columns end up negative. diff -r 4aa4a51a7a77 -r 386ca97bec5b util/human/io.lua --- a/util/human/io.lua Sat Apr 08 12:56:13 2023 +0200 +++ b/util/human/io.lua Sun Apr 09 01:34:08 2023 +0200 @@ -123,7 +123,7 @@ local function ellipsis(s, width) if len(s) <= width then return s; end - if width == 1 then return "…"; end + if width <= 1 then return "…"; end return utf8_cut(s, width - 1) .. "…"; end