]> git.ipfire.org Git - thirdparty/coreutils.git/commit
ls: fix too few display columns edge case
authorPádraig Brady <P@draigBrady.com>
Mon, 4 May 2026 14:34:01 +0000 (15:34 +0100)
committerPádraig Brady <P@draigBrady.com>
Mon, 4 May 2026 22:57:48 +0000 (23:57 +0100)
commit13b8c11275669ebdf8cdac714eec8fb9566a4237
tree484fab4b62e15546e2e2b440017a42e0e1a3f28d
parentdce828c3d653761daa5f5508369f9ed41436b453
ls: fix too few display columns edge case

In the edge case where the right most column would
consist of only files taking 1 or 2 cells, we accounted
for 3 cells, which would result in using 1 column too few.
This should have been part of commit v8.24-59-ge71be1292

* src/ls.c (init_column_info): Don't account for separator
in the the final column.
* tests/ls/w-option.sh: Add a test case.
src/ls.c
tests/ls/w-option.sh