terminal: Cannot see cursor on white background - should have an invert option

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?

About this issue

  • Original URL
  • State: open
  • Created 4 years ago
  • Reactions: 18
  • Comments: 16 (7 by maintainers)

Commits related to this issue

Most upvoted comments

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.

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

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.)

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

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.