Different Behavior of "files.autoSave": "onFocusChange" Configuration Compared to VSCode

Hi, thanks for reporting an issue with Cursor.

Before you report this, we’d appreciate if you can search this forum to see if this issue has already been reported.

If you have done so, please check this box.
on

Describe the Bug

I have observed that the behavior of the files.autoSave setting in this project differs from that in the original VSCode. Specifically, when I configure “files.autoSave”: “onFocusChange” in VSCode, it includes the functionality of onWindowChange, automatically saving files when switching between windows. However, in Cursor, this behavior is not present, and files do not automatically save when changing window focus.

Steps to Reproduce

  1. Set "files.autoSave": "onFocusChange" in the settings.
  2. Open multiple windows and switch between them.
  3. Notice that the files do not automatically save upon changing focus to another window.

Expected Behavior

I would expect that when using "files.autoSave": "onFocusChange", the behavior should be consistent with VSCode, automatically saving files when switching between windows.

Operating System

MacOS

Current Cursor Version (Menu → About Cursor → Copy)

Version: 0.44.9
VSCode Version: 1.93.1
Commit: 316e524257c2ea23b755332b0a72c50cf23e1b00
Date: 2024-12-26T21:58:59.149Z
Electron: 30.5.1
Chromium: 124.0.6367.243
Node.js: 20.16.0
V8: 12.4.254.20-electron.0
OS: Darwin arm64 24.2.0

Additional Information

Null

Does this stop you from using Cursor

No - Cursor works, but with this issue

Hey, does your project contain a .vscode folder with a settings.json file? Check if there are any overrides of your Cursor settings there.

1 Like

Yes, it has a .vscode folder and a settings.json file. After I delete the folder, problem solved. Thanks!

1 Like