Add cursor foreground/background color #7548

Closed
opened 2026-01-31 01:06:59 +00:00 by claunia · 3 comments
Owner

Originally created by @nj-ms on GitHub (Apr 22, 2020).

Description of the new feature/enhancement

Unless I'm mistaken, Windows Terminal configuration supports just the cursorColor setting, which functions as if I've set both the foreground and background colors to the same color.
Other terminal programs (Alacritty, ..., ?) support configuration of the cursor foreground color and the cursor background color, and/or they respect the foreground color setting and the character shows through the cursor.
For example, I'd like to set the background to black (#000000), foreground to white (#ffffff), the cursor background to magenta (#990099) and the cursor foreground to white (#ffffff).
This way, I can still see the character under the cursor.
This is especially annoying, for example, if I'm in a Linux WSL and vim'ing a file.
This modification is also important in relation to #1379.

Proposed technical implementation details

  • Make the current cursorColor setting continue to set both foreground and background colors.
  • Add a cursorBackground setting to set just the background color; should use cursorColor by default.
  • Add a cursorForeground setting to set just the foreground color; should use foreground and/or cursorColor by default. It might also work to just use the foreground color and make the character show through the cursor, with the drawback that it's slightly less configurable.
Originally created by @nj-ms on GitHub (Apr 22, 2020). # Description of the new feature/enhancement Unless I'm mistaken, Windows Terminal configuration supports just the `cursorColor` setting, which functions as if I've set both the foreground and background colors to the same color. Other terminal programs (Alacritty, ..., ?) support configuration of the cursor foreground color and the cursor background color, and/or they respect the foreground color setting and the character shows through the cursor. For example, I'd like to set the background to black (`#000000`), foreground to white (`#ffffff`), the cursor background to magenta (`#990099`) and the cursor foreground to white (`#ffffff`). This way, I can still see the character under the cursor. This is especially annoying, for example, if I'm in a Linux WSL and vim'ing a file. This modification is also important in relation to #1379. # Proposed technical implementation details * Make the current `cursorColor` setting continue to set both foreground and background colors. * Add a `cursorBackground` setting to set just the background color; should use `cursorColor` by default. * Add a `cursorForeground` setting to set just the foreground color; should use `foreground` and/or `cursorColor` by default. It might also work to just use the `foreground` color and make the character show through the cursor, with the drawback that it's slightly less configurable.
claunia added the Issue-FeatureResolution-Duplicate labels 2026-01-31 01:06:59 +00:00
Author
Owner

@JeunghunKim commented on GitHub (Apr 23, 2020):

Inverse_cursor

Some terminals just inverse foreground/background colors like that picture.

@JeunghunKim commented on GitHub (Apr 23, 2020): ![Inverse_cursor](https://user-images.githubusercontent.com/18302308/80050618-1a66a080-8551-11ea-9b80-309efd153d8c.png) Some terminals just inverse foreground/background colors like that picture.
Author
Owner

@DHowett-MSFT commented on GitHub (Apr 24, 2020):

Thanks for the well-written feature request! I'm going to move it over as a comment to /dup #1203. We need a good story for this, whether it's inversion or a defined color. I played with making this work properly using "D2D Magic" at one point, and the results weren't horrid.

@DHowett-MSFT commented on GitHub (Apr 24, 2020): Thanks for the well-written feature request! I'm going to move it over as a comment to /dup #1203. We need a good story for this, whether it's inversion or a defined color. I played with making this work properly using "D2D Magic" at one point, and the results weren't horrid.
Author
Owner

@ghost commented on GitHub (Apr 24, 2020):

Hi! We've identified this issue as a duplicate of another one that already exists on this Issue Tracker. This specific instance is being closed in favor of tracking the concern over on the referenced thread. Thanks for your report!

@ghost commented on GitHub (Apr 24, 2020): Hi! We've identified this issue as a duplicate of another one that already exists on this Issue Tracker. This specific instance is being closed in favor of tracking the concern over on the referenced thread. Thanks for your report!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#7548