Skip to content

A diff marks the changed words inside a changed line - #373

Merged
jamescrosswell merged 1 commit into
mainfrom
feat/diff-word-marks
Oct 1, 2026
Merged

jamescrosswell merged 1 commit into
mainfrom
feat/diff-word-marks

Conversation

@a-team-app

@a-team-app a-team-app Bot commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor

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

  • Turbo Pascal and Modern Borland mark words with a darker red/green than the line tint, not the bright palette colours: bright green/red backgrounds made their bright green and red syntax colours unreadable.
  • A user theme without diffEditor.removedTextBackground / insertedTextBackground gets a fixed dark red/green, the same way the line tints already fall back.

🤖 Generated with Claude Code

a-team try tuicode 373

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>
@a-team-app
a-team-app Bot marked this pull request as ready for review October 1, 2026 11:50
@jamescrosswell
jamescrosswell merged commit 96b58ca into main Oct 1, 2026
16 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.

A diff marks the changed words inside a changed line

1 participant