In reverse video, cursor can disappear
- Dominant language
- Swift
- Stars
- 6.9k
- Forks
- 746
- PR merge metrics
- No merged PRs in 30d
Description
Granted this probably isn't exactly a _common_ occurrence, but while I have my terminals set to Solarized (Dark), I set my editor to Solarized Light to easily distinguish it and because it's a bit easier on my eyes for longer coding sessions.
Unfortunately, because the Blink cursor color is the same as the foreground text, that means it totally disappears. Observe, first with the cursor on line 2, column 1 of the file (from a terminal perspective, line 3 col 0, the opening brace in `{-# LANGUAGE...`)—it's very distinctive here because Emacs has highlighted it (along with the matching closing brace, which is _not_ where the cursor is) for application-specific reasons:

Now, I move down one line, to terminal line 4 col 0, at the beginning of `module CC where`:

and, moving the cursor right by characters:


You can _just_ make out the location of the cursor because of the desaturation of the character underneath it, but it's nearly impossible to see on an iPad Pro (especially in night shift color rendering) and _is_ totally invisible when the cursor is not over a text character.
Based on what other terminal emulators do, I'd suggest either a "smart cursor" coloring that adapts to what's behind it (many shift to an outline when the cursor is within a solid multiline area of saturated color, or do a colorwheel calculation to dynamically find an appropriate color that's equidistant from foreground and background), or at least a change such that the cursor color cannot be _exactly_ the value of any of the defined theme colors, since it's always possible that you'll be in a solid multiline block of that color.
If you want something that's static in the theme but doesn't add an additional storage slot to the theme, perhaps a simple color shift algorithm to start with the foreground color and if it's light, darken by 5%, if dark, lighten by 5%, while avoiding other colors defined in the theme. But I'm just spitballing here; I just wanted to make you aware of the issue, as it's a usability showstopper for me—I know most folks don't use lots of colors in TTY mode, but I do. Thanks!
Contributor guide
No contributing guide indexed for this repository
Research direction
No files, tests, or entry points are named in the issue. Reproduce the disappearing cursor with Solarized Dark terminals and a Solarized Light editor, then inspect the terminal cursor and theme-color rendering paths; done means the cursor remains visibly distinguishable over text and empty background areas.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- swift
- Domain
- design, mobile-dev
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100