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

Cannot see cursor on white background - should have an invert option #7118

Open
Tracked by #13392
mangelozzi opened this issue Jul 29, 2020 · 17 comments
Open
Tracked by #13392
Assignees
Labels
Area-Accessibility Issues related to accessibility Area-Rendering Text rendering, emoji, complex glyph & font-fallback issues Issue-Task It's a feature request, but it doesn't really need a major design. Priority-2 A description (P2) Product-Terminal The new Windows Terminal.

Comments

@mangelozzi
Copy link

mangelozzi commented Jul 29, 2020

Environment

Windows build number: Microsoft Windows [Version 10.0.19041.388]
Windows Terminal version (if applicable): Version: 1.1.2021.0

Steps to reproduce

I have read this post:
#1203 (comment)
Apparently I am not smart enough to figure this out.

What I don't understand is how to set my cursor to just simply invert the FG and BG?
To me it is silly to set one of them to a fixed colour, and set the other to a foreground of background, cause at some point you will end up with the same colour FG and BG, and then cant read the text.

I use VIM, and I am tired of when the cursor is on white text, I have to guess where I am, type a few chars, delete them, move a little, try again.

I can't find where in the docs does cursorTextColor go (I think its not in the docs)? Under profiles? Under schemes, so I added it to both.

E.g. I have tried various combinations of cursorColor, cursorTextColor set to textForeground, textBackground, and null

Actual behavior

White text on white background

Expected behavior

It seems impossible to have the following (should be default scenario):
Case 1: White text on Black background -> Cursor is Black text on White background
Case 2: Black text on White background -> Cursor is White text on Black background

I must be missing the obvious here?

@ghost ghost added Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting Needs-Tag-Fix Doesn't match tag requirements labels Jul 29, 2020
@DHowett
Copy link
Member

DHowett commented Jul 31, 2020

Alas! You've unfortunately stumbled into one of our known-bad rendering issues. Sorry about that.

I just had a trip over the repo, and it seems like we did lose track of the request that the cursor simply invert. More info in the spec #6151.

I'm going to make this the master tracking issue for cursor invert.

@DHowett DHowett changed the title Cannot see cursor on white background Cannot see cursor on white background - should have an invert option Jul 31, 2020
@DHowett DHowett added Area-Accessibility Issues related to accessibility Area-Rendering Text rendering, emoji, complex glyph & font-fallback issues Issue-Task It's a feature request, but it doesn't really need a major design. Priority-1 A description (P1) Product-Terminal The new Windows Terminal. and removed Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting labels Jul 31, 2020
@ghost ghost removed the Needs-Tag-Fix Doesn't match tag requirements label Jul 31, 2020
@DHowett DHowett added this to the Terminal v2.0 milestone Jul 31, 2020
@bohrshaw
Copy link

bohrshaw commented Sep 7, 2020

I'm totally set back by this unreadability of cursor text.

@zadjii-msft
Copy link
Member

@bohrshaw while it's not as flexible as an inverted cursor, you could always set the cursorColor to something other than white

@ffes
Copy link

ffes commented Oct 13, 2020

while it's not as flexible as an inverted cursor, you could always set the cursorColor to something other than white

@zadjii-msft But as long as there is no cursorTextColor (#6161) setting you will still have unreadable chars.

@zadjii-msft
Copy link
Member

That's correct. Like I said, it's not as flexible, but it's certainly a helpful reminder for people who like a white background for their terminal.

@mangelozzi
Copy link
Author

That's correct. Like I said, it's not as flexible, but it's certainly a helpful reminder for people who like a white background for their terminal.

The thing is, when there are popups, or modals, the colors are often inverted to the normal working colour. I prefer darktheme like most terminal uses. But there are times when the background becomes white beyond my control.

@nickjj
Copy link

nickjj commented Oct 19, 2020

That's correct. Like I said, it's not as flexible, but it's certainly a helpful reminder for people who like a white background for their terminal.

In practice it's still a deal breaker for anyone using terminal Vim because every color is going to clash with how your Vim theme colors up keywords. Even with a dark theme you still run into scenarios where the cursor hides the character under it.

The only workaround I've seen so far is to use the vintage cursor but this has a lot of limitations around dynamically setting the cursor depending on which Vim mode you're in because a thick underline isn't a standard cursor but a block cursor is.

@zadjii-msft zadjii-msft modified the milestones: Terminal v2.0, 22H1 Jan 4, 2022
@zadjii-msft zadjii-msft modified the milestones: 22H1, 22H2 Aug 3, 2022
zahidislm added a commit to zahidislm/dotfiles that referenced this issue Dec 4, 2022
- changed 'core' plugin dir -> 'startup' dir
- moved core vim options, funcs, & mappings to core dir
- lualine -> feline
- rewrote cmp, lsp, telescope configs
- removed nvim-tree -> native telescope browser.
- removed bufferline -> cybu to browse buffers.
- created a global func 'kmap' to register mappings
- lazy loaded completions
- lsp now formats after save properly
- simplified lsp server & tool loading
- lsp mappings done thru lspsaga.
- theme change: github -> nightfox
- scrapped autotheming; currently upstream issues. [ microsoft/terminal#7118 ]
- added lua & c/cpp language servers & formatters
- removed rust-analyzer init with lspconfig. Will be fixed later.

- a bunch of other breaking changes
- a bunch of other minor cosmetic changes.
@igniscyan
Copy link

@DHowett Hey there, found this issue since I'm still encountering it. What is the most up to date ticket on this?

@mangelozzi
Copy link
Author

I think not being able to see the text should be prioritised over fancy effects. Personally I have changed to linux since opening this issue. It was a hard transition having only ever used windows before, but I have never looked back was I perfected my set up.

@igniscyan
Copy link

I think not being able to see the text should be prioritised over fancy effects. Personally I have changed to linux since opening this issue. It was a hard transition having only ever used windows before, but I have never looked back was I perfected my set up.

I've been considering it, but my biggest thing has been that I have lots of windows only software (including games). I may end up just having to get another drive just for Linux dual booting.

Either way, would love to see this fixed!

@lhecker lhecker modified the milestones: 22H2, Terminal v1.19 May 25, 2023
@lhecker lhecker self-assigned this May 25, 2023
@lhecker
Copy link
Member

lhecker commented May 25, 2023

FYI you'll find that the new Windows Terminal Preview 1.18 will have practically fixed this issue, even if it doesn't implement inverted cursors just yet. I intend to add an invert cursor option in 1.19.
(Note however that 1.18 has a known issue with a small number of fonts. If you're affected by this, I've put a temporary workaround here: #15199 (comment).)

@lhecker
Copy link
Member

lhecker commented May 26, 2023

I just realized that I once again mixed up invert and reverse. 😵‍💫 Invert is 1-color whereas reverse is swap(foreground, background) and I mix them up every single time.

Windows Terminal Preview 1.18 has an invert option: Just set the cursor color to #ffffff. The text renderer will ensure that the cursor text will always remain visible. I'll use this issue to track invert and explicit cursor text colors, but technically, at least going by the title, we can close it.

weibeld added a commit to weibeld-setup/settings-windows-terminal that referenced this issue Jul 27, 2023
The preview version of Windows Terminal v1.18 fixes the issue of
illegible text under the cursor by somehow automatically determining the
colour of the character under the cursor.

The colour of the character under the cursor is not constant, it changes
depending on the native colour of the character (and probably the colour
of the cursor). However, the contrast is acceptable in most cases. See
more information about this feature in [1].

Setting the cursor text colour explicitly as part of the colour scheme
(arguably a better solution than the current implementation) is still
separately discussed in [2].

[1] microsoft/terminal#7118
[2] microsoft/terminal#15766
@lhecker lhecker modified the milestones: Terminal v1.19, Terminal v1.20 Sep 5, 2023
@mangelozzi

This comment was marked as off-topic.

@lhecker

This comment was marked as off-topic.

@mangelozzi

This comment was marked as off-topic.

@lhecker
Copy link
Member

lhecker commented Sep 26, 2023

I'm not sure if you're intentionally ignoring parts of what I wrote so I'll mark your comments and my responses as off-topic, because at this point I'm starting to be a little bit annoyed by this.

Just to be entirely clear: Right now the feature is available in "Windows Terminal Preview". Not "Windows Terminal". You will find it in the "Microsoft Store" (= app store) and it will be version 1.18.

In a few days 1.18 will be available as non-Preview and you'll be able to use the new AtlasEngine with the fixed cursors there if you manually opt into it (it's off by default in non-Preview and enabled by default in Preview).

@DHowett
Copy link
Member

DHowett commented Aug 22, 2024

Since we now have cursor inversion and a forced contrast distance for solid cursor colors, I'm going to change the priority on this bug to 2 and move it to the 1.23 milestone.

@DHowett DHowett added Priority-2 A description (P2) and removed Priority-1 A description (P1) labels Aug 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Accessibility Issues related to accessibility Area-Rendering Text rendering, emoji, complex glyph & font-fallback issues Issue-Task It's a feature request, but it doesn't really need a major design. Priority-2 A description (P2) Product-Terminal The new Windows Terminal.
Projects
None yet
Development

No branches or pull requests

8 participants