[FEATURE] Configurable context lines for Edit tool diffs

Resolved 💬 3 comments Opened Apr 12, 2026 by daira Closed Apr 16, 2026

Problem

When the Edit tool modifies a file, the diff shown to the user has a fixed number of context lines. When edits are in code with repetitive structure (e.g., multiple similar blocks), the limited context can make it hard to tell which block was modified, leading to misreading the diff.

Proposal

Add a setting (e.g., in settings.json) to control the number of context lines shown around Edit tool diffs:

{
  "editDiffContextLines": 5
}

Default could remain as-is; users who find themselves misreading diffs due to elided lines could increase it.

Why

In a code review session, the user misread diffs twice due to insufficient context, mistakenly thinking code was missing when it was just outside the visible window. More context lines would have prevented both misreadings.

🤖 Filed with assistance from Claude Code.

View original on GitHub ↗

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