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

file.autoSave = afterDelay causes cursor to jump around with very low delay time #240521

Closed
aYorky opened this issue Feb 12, 2025 · 20 comments
Closed
Assignees

Comments

@aYorky
Copy link

aYorky commented Feb 12, 2025

As of the latest update, the file.autoSave setting causes the cursor to jump around when set to afterDelay with a very low delay time. Typically I have my file.autoSaveDelay set to an admittedly absurd/unnecessary 100ms, but this effect is noticeable up to at least 500ms. Obvious workarounds are to disable auto save or turn the delay up to at least 600ms.

To be more specific about the "jumping around," at least if I'm still on the same line, the cursor will jump backwards by a few characters, presumably to the last character I'd written before the autoSave was initiated.

Does this issue occur when all extensions are disabled?: Yes No

  • Version: 1.97.1
  • Commit: e249dad
  • Date: 2025-02-10T13:13:58.153Z
  • Electron: 32.2.7
  • ElectronBuildId: 10660205
  • Chromium: 128.0.6613.186
  • Node.js: 20.18.1
  • V8: 12.8.374.38-electron.0
  • OS: Windows_NT x64 10.0.26100
@caiodutra08
Copy link

This is happening for me with Auto Save Delay above 600ms, to be more specific, 1000ms.

@bpasero
Copy link
Member

bpasero commented Feb 12, 2025

If this is a confirmed regression, it would help to know which change caused it. We maintain a node.js based CLI tool vscode-bisect that automatically downloads and runs previous VS Code insiders and asks for each build if the issue reproduces. It takes up to 8 steps to find exactly the build that caused the regression.

Steps:

  • install node.js (if not yet done)
  • npx --yes @vscode/vscode-bisect@latest
  • follow the instructions until you found the offending build (its fine to leave the commit empty)
  • report back the commit range in this issue

Thanks!

@bpasero bpasero added info-needed Issue requires more information from poster confirmation-pending labels Feb 12, 2025
@aYorky
Copy link
Author

aYorky commented Feb 12, 2025

@bpasero the bisect tool was unable to find the issue.

I'm not sure what this means/implies, but for my normal workspace, the troublesome configuration is located in the User settings (%appdata%\Roaming\Code\User\settings.json). This location did not seem to affect the builds opened by the bisect tool, so I copied the settings to the .vscode/settings.json file.

@caiodutra08
Copy link

Hey, just a quick follow up.
I've uninstalled a bunch of extensions, and it hasn't occurred anymore.
Weird thing because it wasn't happening since this new update.

Extensions uninstalled:

  • Apc Customize UI++
  • Azure Resources
  • Console Ninja
  • EchoAPI for VS Code
  • GitHub Pull Requests
  • GraphQL: Syntax Highlighting
  • JavaScript (ES6) code snippets
  • jQuery Code Snippets
  • npm Intellisense
  • Paste JSON as Code
  • Simple React Snippets
  • Spring Initialzr Java Support
  • Turbo Console Log
  • Some themes (Vampire/Vampiro)
  • Vetur and Vue - Offical
  • WSL

So I don't really know now if any of these could cause any problems.
And my question is, @aYorky do you have any of these extensions enabled?

Ps:
I haven't installed any extensions to the Insider version of VSCode, and it worked just fine.

@aYorky
Copy link
Author

aYorky commented Feb 12, 2025

@caiodutra08 I do not have any of those extensions. As noted in the original post, disabling all extensions did not resolve the issue. Is there a functional difference between disabling and actually uninstalling the extensions? I wouldn't think so.

@caiodutra08
Copy link

I don't think so... but uninstalling, stopped with this weird jumparound.

@caiodutra08
Copy link

I made a rollback to the previous version, and updated again, and its working fine now...

@aYorky
Copy link
Author

aYorky commented Feb 12, 2025

How'd you do the rollback? Maybe a stupid question, but I legit don't think I've ever had to rollback software before somehow.

@caiodutra08
Copy link

First I synced in and saved all my data/config, then made sure to remove VSCode by it all.
Then installed 1.96.4: https://update.code.visualstudio.com/1.96.4/win32-x64/stable
Then updated.

@bpasero
Copy link
Member

bpasero commented Feb 12, 2025

/gifPlease

Copy link

Thanks for reporting this issue! Unfortunately, it's hard for us to understand what issue you're seeing. Please help us out by providing a screen recording showing exactly what isn't working as expected. While we can work with most standard formats, .gif files are preferred as they are displayed inline on GitHub. You may find https://gifcap.dev helpful as a browser-based gif recording tool.

If the issue depends on keyboard input, you can help us by enabling screencast mode for the recording (Developer: Toggle Screencast Mode in the command palette). Lastly, please attach this file via the GitHub web interface as emailed responses will strip files out from the issue.

Happy coding!

@caiodutra08
Copy link

caiodutra08 commented Feb 12, 2025

Hi, another quick update. It didn't fixed it anything.
Its jumping around again.

Here's the recording:

Image

You can see it when I was trying to type 'x', it was going forward for some reason.
Wish I could find a better video trying to replicate but it wasn't doing it.

@bpasero
Copy link
Member

bpasero commented Feb 12, 2025

Thanks, I would not clear steps how to reproduce this from a fresh setup so I can diagnose what issue this is and if a fix can be made in core.

To begin with: Can you try to run code --disable-extensions --user-data-dir <directory> where <directory> is an empty folder? This will ensure Code is starting with a fresh data directory, e.g. no specific settings and without any extensions running.

@caiodutra08
Copy link

Hi, another one more clear:

Image

As you can see it clear, twice. As it seems, the cursor saves some position when it autosaves, and apply the position on the cursor (idk haha).

And sure ill try your suggestion.

@aYorky
Copy link
Author

aYorky commented Feb 12, 2025

@bpasero I am not experiencing the issue in the fresh VSC instance. I will not post a gif of the issue (unless requested) as @caiodutra08's gif is exactly what I'm seeing.

Image

@caiodutra08
Copy link

Yep, me neither.

@Leask
Copy link
Contributor

Leask commented Feb 13, 2025

Same here, it jumps randomly every few seconds. 💔

@bpasero
Copy link
Member

bpasero commented Feb 13, 2025

If it does not reproduce in a fresh user data dir, then it is either caused by an extension or by setting. Again, I need clear instructions for how to reproduce and not videos at this point.

@shankerwangmiao
Copy link

Hi, I also have this issue. The cursor jumps back randomly while typing. But the symptom happens more frequently over the Remote plugin, via an SSH link, whose delay is about 100ms. I tried to install the previous version of VS Code, but the symptom persists. I guess it may be related to a certain extention?

# code --version on the remote hose
1.96.4
cd4ee3b1c348a13bafd8f9ad8060705f6d4b9cba
arm6

Local version:

Version: 1.96.4 (Universal)
Commit: cd4ee3b1c348a13bafd8f9ad8060705f6d4b9cba
Date: 2025-01-16T00:16:19.038Z
Electron: 32.2.6
ElectronBuildId: 10629634
Chromium: 128.0.6613.186
Node.js: 20.18.1
V8: 12.8.374.38-electron.0
OS: Darwin arm64 24.3.0

@aYorky
Copy link
Author

aYorky commented Feb 13, 2025

I've just learned a few things:

  • There is a "task manager" for running extensions
  • There is a bisect tool specifically for finding problematic extensions
  • Clicking "Disable all installed extensions" requires VS Code to reload for this to take effect

Through this, I've determined that my initial report that the issue still occurred while extensions were disabled (or so I thought) was incorrect. The extension bisect tool has revealed that the EditorConfig extension was causing the problem, and indeed there is already an issue for this.

@aYorky aYorky closed this as completed Feb 13, 2025
@vs-code-engineering vs-code-engineering bot removed the info-needed Issue requires more information from poster label Feb 13, 2025
@bpasero bpasero marked this as a duplicate of #241053 Feb 18, 2025
@bpasero bpasero marked this as a duplicate of #241020 Feb 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants