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
ghost opened this issue Apr 1, 2024 · 5 comments
Open

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

ghost opened this issue Apr 1, 2024 · 5 comments

Comments

@ghost
Copy link

ghost 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

@ghost
Copy link
Author

ghost 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.

@dnjat
Copy link

dnjat commented Jun 5, 2024

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

@davhaa15
Copy link

davhaa15 commented Jun 5, 2024

Same issue here. Very annoying since I've built a habit of auto-formatting frequently. Started happening once I reached about 3000 lines (maybe 100kb file size?)

@Hakityc
Copy link

Hakityc commented Jul 3, 2024

我想知道,这个问题通常会发生在大文件上吗?同时,有没有办法可以临时解决这个问题呢?

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

4 participants