After reading @ArinCantCode suggestion about 2 versions of file, I’ve found solution for myself.
I previously checked that renaming myfile.py to myfile2.py would temporarily fix the problem, but the issue would return if I restored the original name.
So I decided to try reopening the Cursor app while the original file didn’t exist (assuming maybe it would create one or something). This actually resolved the problem!
Here’s my step-by-step solution:
- Make sure the problematic file (the one with highlighted changes) is open in a tab.
- Close the Cursor app completely.
- Rename the file (while the app is closed) using your file explorer, console, or any other tool.
- Reopen the Cursor app.
- The previously open tab should now display an error message (file does not exist).
- Change the file name back to its original name.
- In my case—success! The unwanted highlighting was finally gone.