missing functions for default text and background colors on Windows #26
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hey guys,
last day, my anger beat my patience... I'm using the Grails Web Application Framework for some projects since over a year now and it's console output leaves an unfinished/unprofessional impression. On Linux it looks much better.
My plan was to fix it with a contribution to the Grails code-base again. Many hours later, the workaround for Windows special treatment was working. Like many people before me, who uses jansi, i came to the same conclusion that Windows simply doesn't support any way to get or set the default text or background colors on a standard console window.
Grails uses jansi for it's console output. So i pulled jansi's source, to understand how to use it the right way. Found out it uses a dedicated Windows Console API. Looking how that API works: it supported to read and set default colors. But what is wrong with that, why does it not work in jansi?
Then hit me the lightning. That code was simply not implemented. Forgotten maybe.
This pull request is a pretty simple one, but it helps a lot to emulate the same behaviour on different platforms. Setting the default text and background color is a core functionality of your API (and ANSI).
I sacrificed over a day for this small outcome. You give me much reward if you integrate this pull-request and publish a new release quickly. Then God don't need to kill a innocent kitten each day ;)
Thank you for your time!