Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the difference between "onFocusChange" and "onWindowsChange" in VSCode?

VSCode enables the following options for files.autoSave:

  1. onFocusChange
  2. onWindowsChange

Each having the following description:

  1. A dirty editor is automatically saved when the editor loses focus.
  2. A dirty editor is automatically saved when the window loses focus.

What is the difference between the two? When does the editor lose focus and when does the window do that?

like image 465
Paul Razvan Berg Avatar asked Sep 04 '25 03:09

Paul Razvan Berg


1 Answers

onFocusChange auto-saves files both when you switch windows on your computer AND when you switch tabs within VSCode.

onWindowChange auto-saves files only when you switch windows on your computer.

like image 97
Paul Razvan Berg Avatar answered Sep 07 '25 18:09

Paul Razvan Berg



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!