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

missing functions for default text and background colors on Windows #26

Merged
merged 1 commit into from
Apr 7, 2014

Conversation

ghquant
Copy link
Contributor

@ghquant ghquant commented Jan 22, 2014

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!

@davsclaus
Copy link
Member

Thanks for your PR.

@chirino dont you think we can merge this PR?

chirino added a commit that referenced this pull request Apr 7, 2014
missing functions for default text and background colors on Windows
@chirino chirino merged commit c3b76bc into fusesource:master Apr 7, 2014
@chirino
Copy link
Member

chirino commented Apr 7, 2014

PR looks good! Thanks for spotting the omission!

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.

3 participants