Cursor Tab Adding Newlines in Random Places on Accept

Cursor Tab Adding Newlines in Random Places on Accept

6 Likes

Hey, could you provide more details? A screenshot or video would be great.

I’m experiencing the same issue, and it’s a bit annoying. I found this discussion about it, but it says the problem was resolved in a recent update: https://forum.cursor.com/t/cursor-tab-constantly-trying-to-add-new-lines-since-v0-41/18014

1 Like

I posted the original discussion. Indeed they solved it pretty fast, that was on September 2024, but it’s beggining to happen to me again since a few days back. Seems like I’m not the only one.

1 Like

Hey deanrie, thanks for the quick response and apologies for the lack of details. Here is a loom recording of the issue:

as you can see the issue is pretty much the title. Newlines get added on accept. Only started noticing this issue after installing the recent updates. Not sure which version caused this issue as I have been prompted to install several updates in the last 2 days. Please let me know if I can provide further details. Looking forward to diagnosing this issue! Thx!!

super annoying lol… started happening again recently after installing the latest updates.

yes I noticed it the last few days after installing the recent updates.

Notice this too

+1 having same issue here.

me too my god …

I have same :frowning:

One more vote for this. Happens pretty consistently, and the placement of the new lines could be in any random place later in the function.

1 Like

In my case, that will remove my next element.

in the screenshot, I only need add the }, but the cursor wanna remove my next line code. This issue show up after I update the cursor.

Reload or Restart can’t solve my problem.

I have the same issue… This is really annoying. This has been going on for weeks now. I am genuinely thinking about moving away from Cursor for this sole reason

Same thing here, extremelly annoying and counter productive, not only this will make us manually delete these empty lines, but we can fail to notice or forget to delete, making our code formatting be broken.

Version is 0.45.10

TileGridGenerator.cs-terra-vitae-Cursor2025-02-0610-12-42online-video-cutter.com-ezgif.com-video-to-gif-converter

It seems that this bug is related to CRLF eol, when changing it to LF, Cursor Tab no longer produces the extra empty line.

This is also the same cause for the bug in Composer’s File Edit Changes box, where all lines are followed by empty lines, making it hard to see what it actually changed without looking at the file directly.

Single File Quick Fix:
Command Pallete > Change End of Line Sequence > LF

New Files Fix:
Workspace/User Settings > files.eol = "\n"

Project Fix:
Install Extension: Change All End Of Line Sequence (vs-publisher-1448185.keyoti-changeallendoflinesequence)
Command Palette > Change All End Of Line Sequence > (Select extension) > (Select directories) > LF

Git Fix:

git config --global core.autocrlf input
git config --global core.eol lf