Cursor converts line endings on Windows

Where does the bug appear (feature/product)?

Cursor IDE

Describe the Bug

This is a carry-over of issue #3537 on GitHub. Unfortunately, all of the discussion is lost there.

From time to time, on Windows, Cursor will wholesale replace CR/LF endings with LF endings. This slows down my workflow because I need to manually open each affected file and restore the line endings. This has been consistently happening for many months. I’ve never had this problem with vanilla VS Code after many years of usage.

Steps to Reproduce

I do not have a repro. It happens apparently randomly. IIRC, one user suggested that it occurs with files where the changes have not been accepted yet.

Expected Behavior

Line endings stay unaffected, as CR/LF.

Operating System

Windows 10/11

Version Information

Cursor IDE

Additional Information

As an aside, it would have been helpful to leave the issues available on GitHub to allow people to recreate them here, especially since you’re leaving it to the community to put in the effort (a second time) to carry them over here, rather than going through a triage process on your end and carrying them over yourselves.

Does this stop you from using Cursor

No - Cursor works, but with this issue

Hey there!

Thanks for reporting this.

That would have been ideal. Unfortunately, GitHub does not let you both disable new issues from being created and leave old ones visible.

This is a known issue that we’re tracking internally. The agent’s file editing tools normalize line endings to LF during processing and don’t restore the original CRLF when writing back on Windows.

I’ve added your report to that existing bug ticket.