Composer adding spaces and breaks in the applied file

Hello,

Im having an issue where composer will add breaks and spaces to the file that it’s editing. Every subsequent apply will add more lines.

This doesn’t seem to happen when its writing the code, rather it happens to the file after i press “Apply”

Does anyone else have this issue, and if so can you suggest a fix or work around?

1 Like

i see that the composer is refreshed without the previous history, im ok with it. but this does not solve the problem for me. It’s still adding empty spaces when i generate new request

hmm thats a shame. seemed to work for me, although i suppose it could have been something else. make sure you rename the folder with all your code in it - this will force cursor to ask you to select a folder when you next open it.

yes it did. but didn’t solve the problem.

what solve the problem is to change the ai model to another one eg. cursor-small for one time. after that change back to claude-3.5-sonnet. that would temporary solve it. until the next time it create same problem again then reapply this method again

it waste more token than it should. but what to do. hope cursor team solve it ASAP. it destroying the cursor user experience

Hi, I am having the same issue. Composer is adding line breaks throughout the code. For me, it seems to be happening only in Python, not when I code in NextJs or Javascript. I haven’t tried other languages.

this is causing me so much pain that i even thinking about stop subscribing. still hoping cursor team to look into this.

temporarily i told myself to give a last try, to uninstall cursor desktop app and reinstall. at least for now it’s working without those empty spaces

Yeah same. Despite having a “Fix” that i outlined above, it keeps happening and i keep having to rename my project folder, which doesn’t work sometimes.

Even more annoyingly, the developers don’t even acknowledge that this is an issue, or that they are working on a fix.

i have created a vscode plugin to solve this problem. you can follow the step in the readme file to install the vsix plugin

This does not work, it seemed to work initially, but that turned out to not be the case. I’ve also tried uninstalling and changing some of the composer related settings, none of which seem to fix the issue.

I suppose the only current way forward is to stop using composer until this eventually gets fixed, which is very unfortunate.

having the same issue


Using apply with the composer adds more and more newlines, after this there was a minimum 5 newlines in between each line of code. When I ask it to remove the newlines, it will reduce the number but not reformat the code properly.

yeap… radio silence from the devs too, im assuming this is a difficult issue for them to fix.

the plugin works, but u need to start with fresh code. when cursor add blank rows for the first time, u need to execute this plugin, then it will nicely delete the unwanted rows.

if you already have more than 1 rows in between the codes, then it will not work. you can copy and paste your whole code to claude to ask it to clear the blank line for u for the first time to start fresh

Would be really helpful for you to report when these issues happen. Best thing to do is:

  1. Temporarily disable Privacy mode (if on)
  2. Run the composer request
  3. cmd+shift+p > report ai action > select the bad “composer” and the bad “apply”, then paste the request ids here

this problem is non-existence in 0.43 :clap::clap: probelm solved