A diff marks the changed words inside a changed line - #373
Merged
Merged
Conversation
A changed line was tinted end to end, so finding the actual edit meant comparing both sides by eye. Words that differ on a Modified row now get a stronger background: diffEditor.removedTextBackground on the left, insertedTextBackground on the right, over the line tint and under the syntax colours. Words (identifier runs, whitespace runs, single other characters) are diffed with the existing Myers LineDiff.Hunks. Leading whitespace is left out so a re-indent marks nothing, and rows sharing under 40% of their characters are treated as rewritten and left unmarked. The marks are computed in Refresh rather than per draw. Every bundled theme sets both keys. The 16-colour Borland themes use a darker red/green than the line tint rather than the bright palette colours, which would wash out their bright green and red syntax colours. Closes #369 Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
9 tasks
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.
In a diff, the words that changed inside an edited line now stand out with a stronger background — deeper red on the left, deeper green on the right — while the rest of the line keeps its tint and syntax colours are unchanged.
Closes #369
diffEditor.removedTextBackground/insertedTextBackgroundgets a fixed dark red/green, the same way the line tints already fall back.🤖 Generated with Claude Code
a-team try tuicode 373