[BUG] Unexpected large diff when editing a single word in a file.

Resolved 💬 3 comments Opened Feb 26, 2026 by fguang Closed Mar 26, 2026

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

When I change only one word in a file, I expect to see a minimal diff (only that word/line changed).
Instead, the diff shows many unrelated changes.
This behavior was still correct last week, and seems to have regressed recently.

<img width="276" height="81" alt="Image" src="https://github.com/user-attachments/assets/d2c2cbaf-c2dd-47b3-92b8-2da375bc3d85" />

but

<img width="455" height="323" alt="Image" src="https://github.com/user-attachments/assets/da339c55-8b79-49e3-b17c-bfa394138188" />

What Should Happen?

a minimal diff like this

<img width="273" height="119" alt="Image" src="https://github.com/user-attachments/assets/35aef14c-552d-407b-979c-8a71ab848c29" />

Error Messages/Logs

Steps to Reproduce

1 open claude
2 change claude to world in @test.js

Claude Model

None

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

2.1.59 (Claude Code)

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Terminal.app (macOS)

Additional Information

This is a very important feature for me.
Without this focused, minimal diff behavior, the editing experience loses immersion and flow.
When working with long text, I can’t reliably identify meaningful changes by eye if too many unrelated lines are highlighted.
Please consider this a high-priority usability issue.

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗