Cursor add empty line on the end of file or change line splitor(CRLF->LF) when automaticlly reading file on windows pc

Where does the bug appear (feature/product)?

Cursor IDE

Describe the Bug

cursor add empty line on the end of file or change line splitor(CRLF->LF) when automaticlly reading file on windows pc
maybe read file util bug
I used cursor to write a java controller unit test in plan mode,cursor ide version is 1.7.40(many version have this bug),cursor started read related code files in my project,there were 21 java files has been modified, the difference is add a empty line on the end of file or changed file line splitor(CRLF->RF)
enviroment: windows 11 pc,cursor 1.7.40,java 1.8 ,default git configuration

Steps to Reproduce

enviroment: windows 11 pc,cursor 1.7.40,java 1.8 ,default git configuration
just need let cursor to read related code files and write some code
readed code file maybe changed(add empty line/change line splitor(CRLF->RF))
sometimes it happens after update cursor version ,maybe readed some files after update

This is not a must-reproduce bug.but happened many times.

Expected Behavior

dont add meaningless empty line /change line splitor when cursor reading code files

Screenshots / Screen Recordings

Operating System

Windows 10/11

Current Cursor Version (Menu → About Cursor → Copy)

Version: 1.7.40 (user setup)
VSCode Version: 1.99.3
Commit: df79b2380cd32922cad03529b0dc0c946c311850
Date: 2025-10-09T02:55:11.735Z
Electron: 34.5.8
Chromium: 132.0.6834.210
Node.js: 20.19.1
V8: 13.2.152.41-electron.0
OS: Windows_NT x64 10.0.19045

For AI issues: which model did you use?

claude4.5 sonnet

For AI issues: add Request ID with privacy disabled

missed
you can find same ask content request before this 7d87d168-0c42-4386-b8dc-c0d3b3f716c0,it happened ,and then i repeat this request,not happened.so missed the first request id

Does this stop you from using Cursor

Sometimes - I can sometimes use Cursor

1 Like

add empty line screenshot

Thanks for the detailed report! This looks like it might be a configuration mismatch. Could you please share:

Cursor Settings (Ctrl+,):

  • files.eol - what’s the current value?

  • files.insertFinalNewline - is this checked?

  • files.trimTrailingWhitespace - is this checked?

Git config: Run git config core.autocrlf - what does it return?

Project files: Do you have .editorconfig or .gitattributes files in your project?

These settings can conflict and cause automatic formatting when files are opened.

cursor settings:

  1. files.eol : auto
  2. files.insertFinalNewline not checked
  3. files.trimTrailingWhitespace not checked
    git config:
    git config core.autocrlf command return true

Project files:
.editorconfig not found
.gitattributes not found

how to fix this problem?


add empty line into many code files again when i updated cursor

This topic was automatically closed 22 days after the last reply. New replies are no longer allowed.