Skip to content

Feature Request: Word-Level Inline Diff View #101

@fast-blender-add-ons-dot-com

Description

Title: Feature Request: Word-Level Inline Diff View (Like difflib.ndiff)

Summary:

The Partial Diff extension is already fantastic for comparing two code selections. But right now, it shows line-level differences only — meaning even small changes highlight entire lines red or green.

To improve precision and readability, especially when reviewing GPT-generated code changes, we’d love to see inline word-level diffs added as an option.


✨ Proposed Enhancement:

Use something like Python's difflib.ndiff() or SequenceMatcher to detect word/token-level changes, and highlight just the changed part of the line.


🚫 Current Behavior (Line-Level Only):

Original (Left) | Changed (Right) -- | -- print("Hello world!") 🔴 (whole line red) | print("Hello brave world!") 🟢 (whole line green)

Current view: both lines are marked fully changed.
Ideal view: just , samples=128 is highlighted.


💡 Implementation Suggestion:

Use a word tokenizer (e.g., split on whitespace + symbols), align both sides using difflib.ndiff() or SequenceMatcher, and render only inserted/deleted words in green/red.


🔥 Why It Matters:

  • Makes GPT-assisted workflows more usable

  • Great for tutorials, pair programming, and self-reviews

  • Lets you immediately understand changes, not just that something changed

Thanks again — Partial Diff is already great, and this would take it to the next level!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions