You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The code here currently sets width (along with some other attributes) on every column to the width of the corresponding column of the first row of the table.
That works well for all columns except the last when the lines are close to wrapping in a terminal window. With the current setup, if the first row is wider than the user's terminal, it will wrap, and because of the above behavior, so will all the other lines because they'll be right-padded with spaces to match the width of the first row.
I'd propose changing the code to only inherit width for the last column of a row if the text in that column is longer than the first rows's width. Either that, or just don't right-pad the last column of each row on output regardless of the column's width.
The text was updated successfully, but these errors were encountered:
The code here currently sets
width
(along with some other attributes) on every column to thewidth
of the corresponding column of the first row of the table.That works well for all columns except the last when the lines are close to wrapping in a terminal window. With the current setup, if the first row is wider than the user's terminal, it will wrap, and because of the above behavior, so will all the other lines because they'll be right-padded with spaces to match the width of the first row.
I'd propose changing the code to only inherit
width
for the last column of a row if the text in that column is longer than the first rows'swidth
. Either that, or just don't right-pad the last column of each row on output regardless of the column'swidth
.The text was updated successfully, but these errors were encountered: