Skip to content

fix: keep interactive cursor visible under NO_COLOR#350

Closed
Solaris-star wants to merge 1 commit into
Byron:mainfrom
Solaris-star:fix/238-nocolor-cursor-visible
Closed

fix: keep interactive cursor visible under NO_COLOR#350
Solaris-star wants to merge 1 commit into
Byron:mainfrom
Solaris-star:fix/238-nocolor-cursor-visible

Conversation

@Solaris-star

Copy link
Copy Markdown

Under NO_COLOR, the selected entry in dua i was invisible because REVERSED was reset by empty SGR color sequences from crossterm. Prefer UNDERLINED (and keep BOLD when focused) when NO_COLOR is set.

Fixes #238.

crossterm still emits empty SGR color wrappers under NO_COLOR that
collapse to CSI 0 m and reset attributes, cancelling REVERSED after
ratatui paints it. Use UNDERLINED for the selected line when NO_COLOR
is set so the cursor remains visible.

Fixes Byron#238.
@Byron

Byron commented Jul 20, 2026

Copy link
Copy Markdown
Owner

For me this doesn't do anything, and NO_COLOR=1 + this PR is the same as without it.

Screenshot 2026-07-20 at 09 31 06

The bar isn't visible, because this fix suffers from the same issue as before: the style is reset immediately.
Let's see if there is a simple solution to this.

@Byron Byron closed this Jul 20, 2026
@Byron

Byron commented Jul 20, 2026

Copy link
Copy Markdown
Owner

Superseded by #351 .

Byron added a commit that referenced this pull request Jul 20, 2026
fix: only strip colors when `NO_COLOR` is enabled (#350)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Cursor line not visible with NO_COLOR

2 participants