Closed willjhenry closed 11 months ago
@willjhenry Try the pre-release version, it should have a fix for this.
awesome - thank you!
It still pages down ~one page, but it no longer jumps to the bottom of the file. Is this expected?
The pre-release improves the case my doing narrow edits. But that is all that can be done from the extension. Further improvements for this behavior should be addressed in VS Code itself.
From the extension we don't really do anything other than telling the editor that the various edits needed to be done to the file as a result of formatting. VS Code chooses to move the cursor or scroll as it sees fit.
If you want to file a bug on VS Code, I recommend setting "python.trace.server": "verbose"
in your user settings. This should capture the file and edits we send back to repro. Reproing the issue, and then share it with the logs.
After black has finished formatting, the editor window jumps to a new line. Sometimes it is just a few lines below, sometimes the very bottom of the file (could be hundreds of lines below). The cursor itself is often in the same position, but the editor window has paged down. Sometimes the cursor itself has jumped to a new location