Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@mislav
Copy link
Contributor

@mislav mislav commented Sep 7, 2020

Preserve a reference to original os.Stdout (pre-colorable) so we can use it to measure terminal width.

Fixes #1618
Followup to #1607

Copy link
Contributor

@samcoe samcoe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code looks good to me. My only question is why does colorable change the terminal width?

@mislav mislav merged commit d13e6b3 into trunk Sep 8, 2020
@mislav mislav deleted the table-width-fix branch September 8, 2020 08:01
@mislav
Copy link
Contributor Author

mislav commented Sep 8, 2020

My only question is why does colorable change the terminal width?

On Windows, NewColorable returns a different Writer stream that was passed in, and that one is not suitable for determining terminal features such as size. Therefore, we have to keep a reference to the original stdout stream somehow.

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

Successfully merging this pull request may close these issues.

issue list command output has gotten narrow!

2 participants