Smarter diff visualization for AI code edits (like Git in Visual Studio)

Hi Cursor team,

First of all, thank you for this amazing tool — it’s become an essential part of my workflow.

I’d like to suggest a feature that could save a lot of time for many developers using the AI editing features.

Currently, when I ask the AI to wrap an existing block of code inside an if statement, the diff shows the original block as entirely deleted, and a new block (inside the if) as entirely added. This makes it very hard to review the change, especially for longer code blocks — I have to manually compare them to make sure nothing inside was modified unexpectedly.

Suggested improvement:

Please adopt a smarter diff mechanism — like the one in Visual Studio’s Git integration — that highlights only the new if statement as an addition, while treating the wrapped code block as unchanged. This way, the visual diff will clearly show that the only change was the if, not the whole block.

This small change could save hours of review time for users like me, and make the AI assistant feel much more seamless.

Thanks a lot for considering!

Best regards,
[Yaakov]

1 Like

Yes, sometimes I edit the whole block of code, that has no similarities but the diff tries to match brackets and similar so something that should be a deleted block and new block added are split into multiple ones. Not a deal breaker for me at all, just thought I would share my experience.

1 Like

For me, the annoying part is going through and checking that he copied all the code correctly [because that’s what he does instead of adding a line first and then rewriting everything]
I started regularly checking the changes through Visual Studio
Saved me hours!