-
Notifications
You must be signed in to change notification settings - Fork 8.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Currently "Inverse Cursor" is actually simply bitwise inversed. It works fine, except when it does not, namely in the middle of the spectrum: Anything close enough to dark grey (index 8, RGB(128, 128, 128) in the classic palette) will for obvious reasons become almost the same dark grey again after the inversion. The issue is addressed by additionally `XOR`ing the inverted color with RGB(63, 63, 63). This distorts the result enough to avoid collisions in the middle. Ultimately this restores the behavior that was in Windows Console since the Middle Ages (and still exists in ConhostV1.dll). ## PR Checklist * [x] Closes #3647 * [x] CLA signed * [x] Tests added/passed * [x] I've discussed this with core contributors already. If not checked, I'm ready to accept this work might be rejected in favor of a different grand plan. Issue number where discussion took place: #3647 ## Validation Steps Performed 1. Open OpenConsole. 2. Properties, Terminal, Cursor Colors, choose Inverse Color. 3. Optionally set the RGB value of the 8th color in the standard palette to RGB(128, 128, 128) on the Colors tab, but the default one will do too. 4. Type `color 80` to see black text on dark grey background. 5. Make sure the inverted cursor is visible. 6. Repeat in WT with both default and experimental renderers.
- Loading branch information
Showing
4 changed files
with
26 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters