Too many new lines after accepting suggestions

When I accept a suggestion, it adds a new line at the end of the block of code ending up with several empty newlines when I accept several suggestions.

I could not find anything about that in the settings. I also tried to give a hint like “never add a new line after suggestion” but it did not work.

Any clue on how to solve this?

Thanks

3 Likes

I’ve been experiencing this issue too.

1 Like

I have noticed that the newline always appear 2 lines after the code modified by the suggestion.

1 Like

After rejecting the last empty lines, I became accustomed to the operation of accepting other codes. :wink:

1 Like

I have used “no-multiple-empty-lines” eslint rule with autoformat to remove the newlines when there are more than 2 but it is not a complete solution because there is still 1 newline too much in most cases.

Hi! Is this still happening on version 0.35.0?

No, it seems to be fixed in 0.35.0! :partying_face: :+1:
Thanks

1 Like

This issue seems to be back on 0.45. Is anyone else seeing it?

Version: 0.45.8
VSCode Version: 1.96.2
Commit: 5af2d34c39df93a39bd54c9b9103cab514b380f0
Date: 2025-02-01T06:17:09.379Z
Electron: 32.2.6
Chromium: 128.0.6613.186
Node.js: 20.18.1
V8: 12.8.374.38-electron.0
OS: Windows_NT x64 10.0.26100

Hey, can you send a screenshot of the result of this?

So here is a screenshot (tried to add more than 1, and it wouldn’t let me, stating I’m new!!) that illustrates what I’m seeing.

Making some edits, and about to accept suggested changes via tab. See the CR character on the editor. When tab is pressed at this point to accept the suggested changes, an extra line is added here:

1 Like

Ah, good spot!

Any chance you could grab a request ID? You can do so with this guide:

I habe the same issue in 0.45.11.

Will this work ?

Last Ai Action ID: c2c0cdcd-3efc-4fbb-96d0-524eb8bd19c6

Hi @danperks - were you able to identify what could be going on? It’s starting to get a little bit annoying to have to delete the extra lines being added every time I use the Tab functionality.

Hey, we’ve identified the cause of this and should have a fix rolled out already!

You guys are the best!! I can confirm the issue is now fixed. Thank you!