Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't inherit column width for last column of a row #34

Open
onlynone opened this issue Oct 23, 2018 · 0 comments
Open

Don't inherit column width for last column of a row #34

onlynone opened this issue Oct 23, 2018 · 0 comments

Comments

@onlynone
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant