unexpected icon indicating copy to clipboard operation
unexpected copied to clipboard

Weird colouring in Windows Powershell

Open sunesimonsen opened this issue 8 years ago • 4 comments

Problem: https://files.gitter.im/unexpectedjs/unexpected/boB2/MinimalReactTest1.PNG

Repro: https://github.com/gertsonderby/magicpen-test

sunesimonsen avatar Jul 04 '16 08:07 sunesimonsen

Notably, this bug seems to only occur in Powershell (specifically, the 'GitHub for Windows' Git Shell). Not sure what it would take to replicate elsewhere.

gertsonderby avatar Jul 04 '16 08:07 gertsonderby

Confirmed as happening (with slightly different colors) in default Powershell (w/o GitHub extensions).

Commenting out node_modules/magicpen/lib/AnsiSerializer.js:131appears to solve the problem.

gertsonderby avatar Jul 04 '16 09:07 gertsonderby

We only close the colors once even when we start a standard color wrapped in a 256 color. It would be interesting to try to insert the following on the line after AnsiSerializer.js:131:

close += ansiStyles[styleName].close;

sunesimonsen avatar Jul 05 '16 10:07 sunesimonsen

That had no effect that I could discern. Still a discolored background.

gertsonderby avatar Jul 05 '16 11:07 gertsonderby