Skip to content

Support foreground/background reversing - #129

Open
zwhfly wants to merge 1 commit into
tartley:masterfrom
zwhfly:master
Open

Support foreground/background reversing#129
zwhfly wants to merge 1 commit into
tartley:masterfrom
zwhfly:master

Conversation

@zwhfly

@zwhfly zwhfly commented Apr 21, 2017

Copy link
Copy Markdown

ESC [ 7 m swap foreground and background

ESC [ 7 m    swap foreground and background
@wiggin15

wiggin15 commented Sep 3, 2017

Copy link
Copy Markdown
Collaborator

Thanks for this pull request. This looks good.
One thing I noticed is that on my Mac terminal, writing the swap ansi code (ESC 7m) twice doesn't re-reverse the foreground and background but instead keeps them reversed. With your change, on Windows, writing the code twice reverts to the original state.
In addition, can you please add a helper function to print this code, like we have for example colorama.ansi.clear_line? e.g. add colorama.ansi.inverse. Thanks.

@tartley

tartley commented Oct 13, 2020

Copy link
Copy Markdown
Owner

Hey. FYI, yesterday I created a PR to test releases before we push them to PyPI. When that is merged, I'll be more confident about resuming merges and releases. I'll try to look at this PR soon. Thank you for creating it!

@tartley

tartley commented Oct 7, 2021

Copy link
Copy Markdown
Owner

Does this duplicate the functionality offered by #267? I have no idea which is better, I'm just trying to understand.

@tartley

tartley commented Oct 7, 2021

Copy link
Copy Markdown
Owner

These code changes can't be merged until they also have corresponding test changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants