fix(inline): derive unified diff1_inline char highlight from DiffText#209
Open
dlyongemallo wants to merge 1 commit into
Open
fix(inline): derive unified diff1_inline char highlight from DiffText#209dlyongemallo wants to merge 1 commit into
diff1_inline char highlight from DiffText#209dlyongemallo wants to merge 1 commit into
Conversation
…ext` Changed chars on a paired row were difficult to distinguish when a colourscheme gave `DiffAdd` and `DiffChange` near-identical backgrounds (e.g., `tokyonight`). Add a `DiffviewDiffTextInline` group derived from `DiffText`, falling back to `DiffAdd` when `DiffText` is unset; overleaf keeps `DiffviewDiffAddInline`. Restores the `DiffText` source used before #171 while keeping the `fg`, so tree-sitter syntax foreground still composes through the overlay. Defines the inline groups with `explicit` rather than `default` so they refresh on `ColorScheme` instead of pinning the value derived at the first `setup()`.
f1a9abb to
1f43990
Compare
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.
Changed chars on a paired row sit on a
DiffviewDiffChangebackdrop, so deriving the overlay fromDiffAddhid them when a colourscheme gaveDiffAddandDiffChangenear-identical backgrounds (e.g.,tokyonight). Add aDiffviewDiffTextInlinegroup derived fromDiffText(as the side-by-side diff does), falling back toDiffAddwhenDiffTextis unset; overleaf keepsDiffviewDiffAddInline.This restores the
DiffTextsource used before #171 (which switched it toDiffAdd) while keeping that commit's droppedfg, so tree-sitter syntax foreground still composes through the overlay.Also define the inline groups with
explicitrather thandefaultso they refresh onColorSchemeinstead of pinning the value derived at the firstsetup().Relates to #205. Overrides the changes in #206.