Where does the bug appear (feature/product)?
Cursor IDE
Describe the Bug
Cursor’s file indexing process repeatedly adds trailing newlines to source files, even when files.insertFinalNewline is set to false and files.trimFinalNewlines is set to true. This creates phantom “modified” files in Git that the user never edited.
Steps to Reproduce
Open a multi-root workspace with multiple repositories
Commit all changes so git status shows clean working tree
Enable Cursor indexing (Codebase Indexing)
Wait for indexing to complete
Run git status - files will show as modified
Run git diff - only change is an added newline at end of file
Expected Behavior
Files should remain unmodified. The indexing process should be read-only.
Operating System
MacOS
Current Cursor Version (Menu → About Cursor → Copy)
Version: 2.2.44 (Universal)
VSCode Version: 1.105.1
Commit: 20adc1003928b0f1b99305dbaf845656ff81f5d0
Date: 2025-12-24T21:41:47.598Z
Electron: 37.7.0
Chromium: 138.0.7204.251
Node.js: 22.20.0
V8: 13.8.258.32-electron.0
OS: Darwin arm64 25.1.0
For AI issues: which model did you use?
Opus 4.5
Does this stop you from using Cursor
No - Cursor works, but with this issue