Skip to content

fix: apply the inline-suggestion style to the suggested text - #1039

Merged
HalFrgrd merged 1 commit into
HalFrgrd:masterfrom
WynandVStaden:fix/set-style-inline-suggestion
Oct 17, 2026
Merged

HalFrgrd merged 1 commit into
HalFrgrd:masterfrom
WynandVStaden:fix/set-style-inline-suggestion

Conversation

@WynandVStaden

Copy link
Copy Markdown
Contributor

Fixes #1038.

Problem

flyline set-style inline-suggestion=... only styled the #idx=… <age> metadata after an inline history suggestion. The suggested text itself was drawn with secondary_text, so the setting appeared to do nothing.

Change

  • src/app/ui.rs: the suggested text is now drawn with colour_palette.inline_suggestion(), like the metadata after it.
  • crates/flycontent/src/palette.rs: the default inline_suggestion style is now what the suggested text already looked like (dim in the dark theme, plain in the light theme), so the default look of suggestions does not change.

One visible difference with the defaults: the metadata used to be blue italic (cyan in the light theme) and is now the same style as the suggestion. If you would rather keep a separate default look for the metadata, I can give it its own style name instead.

Testing

Built the release library on Ubuntu (WSL), loaded it into bash inside tmux with a one-line history, typed echo hel and captured the pane with tmux capture-pane -e:

set-style inline-suggestion= master this branch
bold red suggestion ESC[2m (dim), metadata bold red suggestion and metadata ESC[1m ESC[31m (bold red)
dim italic suggestion ESC[2m, metadata italic suggestion and metadata ESC[2;3m (dim italic)
not set suggestion ESC[2m, metadata ESC[3m ESC[34m suggestion and metadata ESC[2m
  • cargo test --lib --workspace: 884 + 110 + 74 passed.
  • cargo fmt --all -- --check and cargo clippy --workspace --all-features -- -D warnings: clean.
  • No new unit test: the render path needs an App, which library tests cannot create (see AGENTS.md). Docker integration tests not run.

@HalFrgrd

Copy link
Copy Markdown
Owner

Looks good, thanks!

@HalFrgrd
HalFrgrd merged commit 20c66e8 into HalFrgrd:master Oct 17, 2026
7 checks passed
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.

[BUG]: set-style inline-suggestion doesn't work

2 participants