Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Editor scrolls to bottom when format large file using prettier #3360

Open
clive-p opened this issue Apr 1, 2024 · 2 comments
Open

Editor scrolls to bottom when format large file using prettier #3360

clive-p opened this issue Apr 1, 2024 · 2 comments

Comments

@clive-p
Copy link

clive-p commented Apr 1, 2024

In vscode running the editor.action.formatDocument command in a javascript file makes the editor scroll to the last line of the file which is really annoying. It happens for large files that are 6000+ lines. It tends to happen when the content of the line the cursor is on changes due to being formatted.

I've disabled all extensions apart from prettier and it's still happening. I also set up a new vscode codespace and installed prettier and no other extensions and it happens in there. This proves it is a generic issue with prettier and is not specific to my configuration.

@JoCat
Copy link

JoCat commented Apr 22, 2024

I ran into the same problem today, I had a file of almost 3k lines

@clive-p
Copy link
Author

clive-p commented May 31, 2024

This bug is consuming a significant amount of development time and needs to be fixed promptly. With nearly 45 million installations of the Prettier VSCode extension, many users are likely frustrated by this issue. It's crucial for the developers to address this bug to avoid losing such a large user base. The bug can have serious consequences, such as unintentionally modifying the content of the last line of a file without the user realizing it. Fixing this issue will enhance user satisfaction and maintain the integrity of the extension.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants