[FEATURE] Word-level diff highlighting for removed text (symmetric to additions)

Open 💬 0 comments Opened Jun 20, 2026 by Alecell

Summary

Word-level (intra-line) diff highlighting currently applies only to added text. When a large block of text loses a word (or a small edit shrinks an existing block), the removed side shows no word-level highlight — so I have to read the entire before and after and visually compare them to figure out what actually changed.

The request is to make removal highlighting symmetric with additions: when a word/character is removed inside a changed block, highlight it on the before side the same way added words are highlighted on the after side.

Why

  • Additions already get a subtle word-level highlight, which is extremely efficient — you instantly see what was inserted.
  • Removals get nothing comparable, so a single deleted word inside a paragraph forces a full re-read of both sides to locate the change.
  • The asymmetry is the painful part: half the diff is scannable at a glance, the other half is not.

Proposed behavior

When Claude Code decides to render a word-level diff for a changed block, apply the same word/character-level highlight to removed spans on the old side that it already applies to added spans on the new side.

Context

  • Word-level diff rendering was introduced in v0.2.26 via #7 (closed/completed). That issue is locked, and its closing bot comment explicitly asks people to file a new issue referencing it for related follow-ups — hence this one.
  • #7 only delivered the additions side; this is the missing removals counterpart.
  • A comment on #7 (by @djrodgerspryor) already suggested the "two highlighting modes per color — whole line + changed characters" pattern, which is essentially this request applied to both sides.

Environment

  • Surface: Claude Code CLI (terminal), in the edit/diff approval view.

View original on GitHub ↗