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

Support disable-bold,real-underline and native reverse-color. #50

Merged
merged 1 commit into from May 4, 2020

Conversation

hymkor
Copy link
Contributor

@hymkor hymkor commented May 4, 2020

I tried to use ESC[22m to disable bold when ENABLE_VIRTUAL_TERMINAL_PROCESSING is not set, but it does not work as expected.

I made the test-code to compare before/after setting ENABLE_VIRTUAL_TERMINAL_PROCESSING.

The result is the picture below. <%d> means text decorated ESC[%dm

(On the default browser view, it is not clear whether the bold is set or not, so please click image-area TWICE to see clear-screenshot)
image

I created the patch to reduce the differences.

  • ESC[22m disables bold.
  • ESC[27m never makes colors reversed. It disables reverse set by ESC[7m only.
  • ESC[4m enables real-underline which is not bold.

The image below is the screenshot when sample.go runs on Windows8 VM. (Please ignore After EnableColorsStdout)

image

Would you like to merge it if problem does not exist ?

@codecov-io
Copy link

codecov-io commented May 4, 2020

Codecov Report

Merging #50 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master      #50   +/-   ##
=======================================
  Coverage   90.00%   90.00%           
=======================================
  Files           2        2           
  Lines          40       40           
=======================================
  Hits           36       36           
  Misses          4        4           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4e32bdb...4b79b6e. Read the comment docs.

@mattn mattn merged commit c10454b into mattn:master May 4, 2020
@mattn
Copy link
Owner

mattn commented May 4, 2020

Thank you

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.

None yet

3 participants