microsoft / terminal

The new Windows Terminal and the original Windows console host, all in the same place!
MIT License
95.55k stars 8.31k forks source link

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

Open mangelozzi opened 4 years ago

mangelozzi commented 4 years ago

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: https://github.com/microsoft/terminal/issues/1203#issuecomment-632888374 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?

DHowett commented 4 years ago

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.

bohrshaw commented 4 years ago

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

zadjii-msft commented 4 years ago

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

ffes commented 4 years ago

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 commented 4 years ago

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 commented 4 years ago

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 commented 4 years ago

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.

igniscyan commented 1 year ago

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

mangelozzi commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

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: https://github.com/microsoft/terminal/issues/15199#issuecomment-1562785741.)

lhecker commented 1 year ago

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.

mangelozzi commented 1 year ago

3yrs later, I still can't see the cursor. I switched to Linux, but have recently returned to using Windows due to work laptop. The version in the app store in v.117 and one still can't see the cursor. Amazing.

lhecker commented 1 year ago

@mangelozzi

image

mangelozzi commented 1 year ago

@mangelozzi

image

The version in the app store in v.117 and one still can't see the cursor

lhecker commented 1 year ago

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 commented 2 months ago

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.