Repository navigation
fix: apply the inline-suggestion style to the suggested text - #1039
Merged
HalFrgrd merged 1 commit intoOct 17, 2026
Merged
Conversation
Owner
|
Looks good, thanks! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 withsecondary_text, so the setting appeared to do nothing.Change
src/app/ui.rs: the suggested text is now drawn withcolour_palette.inline_suggestion(), like the metadata after it.crates/flycontent/src/palette.rs: the defaultinline_suggestionstyle is now what the suggested text already looked like (dimin 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
bashinsidetmuxwith a one-line history, typedecho heland captured the pane withtmux capture-pane -e:set-style inline-suggestion=bold redESC[2m(dim), metadata bold redESC[1m ESC[31m(bold red)dim italicESC[2m, metadata italicESC[2;3m(dim italic)ESC[2m, metadataESC[3m ESC[34mESC[2mcargo test --lib --workspace: 884 + 110 + 74 passed.cargo fmt --all -- --checkandcargo clippy --workspace --all-features -- -D warnings: clean.App, which library tests cannot create (seeAGENTS.md). Docker integration tests not run.