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

ColorTool: Restore old console colors after printing the color table #17

Merged
merged 1 commit into from
Aug 15, 2017

Conversation

metathinker
Copy link
Contributor

Unfortunately, when you run .\colortool.exe --current, you might notice that the color of the prompt printed after the program finishes is slightly different from what it was before you ran the program.

This changelist fixes the issue by restoring the old console colors after the program finishes printing the color table.

Testing: manual

@msftclas
Copy link

@metathinker,
Thanks for having already signed the Contribution License Agreement. Your agreement has not been validated yet. We will now review your pull request.
Thanks,
Microsoft Pull Request Bot

@metathinker metathinker force-pushed the master branch 2 times, most recently from 5f16b3d to af27c4e Compare August 14, 2017 22:12
@Nacimota
Copy link
Contributor

Nacimota commented Aug 14, 2017

I just reproduced this on my machine, but it appears to be only the foreground colour that gets changed. The background colour is already being reset at the end of the inner for loop on line 167.

@metathinker
Copy link
Contributor Author

The background colour is already being reset at the end of the inner for loop on line 167.

I did notice that, but I thought it would be better to reset both colors at the same time outside the loops for clarity, rather than trying to reset the foreground color in the loop as well.

Unfortunately, when you run `.\colortool.exe --current`,
you might notice that the color of the prompt printed after
the program finishes is slightly different from what it was
before you ran the program.

This changelist fixes the issue by restoring the old console colors
after the program finishes printing the color table.

Testing: manual
@zadjii-msft
Copy link
Member

I also prefer the unambiguity of resetting both at the same time. Thanks for the good catch!

@zadjii-msft zadjii-msft merged commit ce43f9a into microsoft:master Aug 15, 2017
miniksa pushed a commit that referenced this pull request Oct 4, 2019
fix scrolling issues with the terminal
carlos-zamora pushed a commit that referenced this pull request Aug 21, 2020
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.

4 participants