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

VSCode Extension: cursor location move on save #1907

Closed
fonnesbeck opened this issue Oct 24, 2024 · 2 comments · Fixed by #1933
Closed

VSCode Extension: cursor location move on save #1907

fonnesbeck opened this issue Oct 24, 2024 · 2 comments · Fixed by #1933
Assignees
Labels
bug Something isn't working

Comments

@fonnesbeck
Copy link

Describe the bug

After saving changes to a presentation with the extension activated, the cursor moves to a random/arbitrary location in the file. No matter where you place the cursor, saving the file always returns the cursor to this location, making using the extension somewhat disorienting. The location changes from time to time, for reasons I cannot determine.

Minimal reproduction

Steps to reproduce the behavior:

  1. Make changes to slides.md
  2. Save changes
  3. Observe new cursor location unrelated to change

Environment

  • Slidev version: v0.50.0-beta.4
  • Browser: Chrome
  • OS: Fedora 40

If you are using Slidev globally (i.e. npx slidev or npm i -g slidev), please try to reproduce the issue in a local project (i.e. npm create slidev@latest).

@kermanx
Copy link
Member

kermanx commented Nov 1, 2024

I am afraid that I can't reproduce this problem. Could you disable all other extensions, and check the editor.formatOnSave setting and the formatter you're using?

@fonnesbeck
Copy link
Author

Here's a screen capture of what's happening. After I type, I save using ctrl-S and you can see it jump to an arbitrary location. I do not have formatOnSave turned on.

Screencast.From.2024-11-02.12-33-47.mp4

@kermanx kermanx added bug Something isn't working before v1 and removed needs reproduction labels Nov 3, 2024
@kermanx kermanx self-assigned this Nov 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants