F2 Renaming
Describe the bug
With a python file, when renaming a user created symbol either by Right click -> Rename Symbol or [F2] the entire python file gets extra spaces added between all lines.
I am not experiencing this issue with .ts or .html files, only .py. Also note that other files opened in editor are not impacted.
Example before:
def foo():
value = 'bar'
print(value)
foo()
After renaming:
def foo():
valuez = 'bar'
print(valuez)
foo()
Please confirm that this problem is VSCodium-specific
- [X] This bug doesn't happen if I use Microsoft's Visual Studio Code. It only happens in VSCodium.
Please confirm that the issue/resolution isn't already documented
- [X] I checked the Docs page and my issue is not mentioned there.
To Reproduce Steps to reproduce the behavior:
- Open a python file,
.py, in editor - Right click on a user created symbol ->
Rename Symbolor[F2] - Set new symbol name
- Press
Enter - Observe new empty line inserted between all lines of the currently opened python file
Expected behavior When renaming a symbol, no new lines are inserted to the file
Screenshots
Desktop (please complete the following information):
- OS: Windows 11
- Architecture x64
- Version 1.81.1.23222
- App Manager pip
- Sandboxed no
From about:
Version: 1.81.1
Release: 23222
Commit: aef377c42cea6e9aea642829953104f07097abfa
Date: 2023-08-10T18:29:45.715Z
Electron: 22.3.18
ElectronBuildId: undefined
Chromium: 108.0.5359.215
Node.js: 16.17.1
V8: 10.8.168.25-electron.0
OS: Windows_NT x64 10.0.22621
Additional context
Only installed python extension is:
This happened to me in Microsoft's build of VSCode as well. I believe it has something to do with a specific combination of formatter/linter choice. I don't quite remember the exact combination, but the formatter was black for sure.
For me the F2 renaming breaks everything. Using the example code, I get this as a result of renaming the value variable to valuez
)e:fo():
valuzt(v'br'
inluez)
foo()
Also, I use autopep8 as my formatter and not black.
This issue has been automatically marked as stale. If this issue is still affecting you, please leave any comment, and we'll keep it open. If you have any new additional information, please include it with your comment!
This issue has been closed due to inactivity, and will not be monitored. If this is a bug and you can reproduce this issue, please open a new issue.