@@ -728,7 +728,17 @@ widthsFromIndices :: Int -- Number of columns on terminal
728728 -> [Double] -- Fractional relative sizes of columns
729729widthsFromIndices _ [] = []
730730widthsFromIndices numColumns indices =
731− let lengths = zipWith (-) indices (0:indices)
731+ let lengths' = zipWith (-) indices (0:indices)
732+ lengths = reverse $
733+ case reverse lengths' of
734+ [] -> []
735+ [x] -> [x]
736+ -- compensate for the fact that intercolumn
737+ -- spaces are counted in widths of all columns
738+ -- but the last...
739+ (x:y:zs) -> if x < y && y - x <= 2
740+ then y:y:zs
741+ else x:y:zs
732742 totLength = sum lengths
733743 quotient = if totLength > numColumns
734744 then fromIntegral totLength