Green diff preview bug

Where does the bug appear (feature/product)?

Cursor IDE

Describe the Bug

After making some code adjustments, some parts remained green after accepting the changes.

Steps to Reproduce

Common use, it suddenly broke while making adjustments… I don’t know if it was when renaming a file from generalController.php to GeneralController… maybe.

Expected Behavior

One peculiar thing is that if I copy that code and paste it into a file called test.php, it works fine, but if I rename it to generalController.php or GeneralController.php, the green areas reappear automatically… it must be cached with the document name.

If I close and reopen the editor, upon opening it, I see a white circle next to the filename indicating that it ‘has not been saved,’ but obviously it’s already saved; I’m working locally.

Screenshots / Screen Recordings

Operating System

Windows 10/11

Current Cursor Version (Menu → About Cursor → Copy)

Version: 2.1.39 (user setup)
VSCode Version: 1.105.1
Commit: 60d42bed27e5775c43ec0428d8c653c49e58e260
Date: 2025-11-27T02:30:49.286Z
Electron: 37.7.0
Chromium: 138.0.7204.251
Node.js: 22.20.0
V8: 13.8.258.32-electron.0
OS: Windows_NT x64 10.0.26100

For AI issues: which model did you use?

For AI issues: add Request ID with privacy disabled

Additional Information

Does this stop you from using Cursor

No - Cursor works, but with this issue

Hey, thanks for the report. Green diffs remain after accept, possibly file name cache (generalController.php), plus false unsaved indicator, this is something the team is already working on.

Similar: Phantom Diff Changes That Wont Go Away

And Stuck with changes i cannot accept

Temporary workaround: copy all code, Ctrl+Z until diffs disappear, paste back.

Can you please share:

  • Help > Toggle Developer Tools > Console (errors with open file, screenshot)
  • Only this file or others too

I’ll pass this to the team