microsoft / vscode-python

Python extension for Visual Studio Code
https://aka.ms/pvsc-marketplace
MIT License
4.33k stars 1.19k forks source link

Renaming variable adds double line breaks throughout file when using CRLF #24453

Open Sprocketer opened 6 days ago

Sprocketer commented 6 days ago

Behaviour

Pressing F2 to rename a variable, renaming and pressing enter, and then for some reason double line breaks are added to the entire Python file (so that there is a blank line between literally every line)

Steps to reproduce:

  1. Select variable
  2. Press F2 to rename
  3. Rename

Diagnostic data

Nothing is outputted here

Sprocketer commented 6 days ago

Update: found old threads with this, it happens when you use CRLF instead of LF - could this be fixed so that it doesn't happen with CRLF?

karthiknadig commented 4 days ago

@Sprocketer Which language server are you using? look for the following setting python.languageServer.

If it is jedi then it is this one https://github.com/pappasam/jedi-language-server/issues/159 . It should be addressed upstream.