You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Set to true to automatically save files when switching to a different file// or application"save_on_focus_lost": false,
The current behavior actually does do what the setting says, auto saves when focus is lost.
However, it doesn't really match what the comment says, or the comment is at least ambiguous.
As the comment suggests, auto save should only kick in when you switch to a different file or window.
The fact is it's also triggered when you open command palette / quick panel.
This leads to some inconvenience.
I have save_on_focus_lost: true + auto format on save from various package (prettier/LSP)
And LSP recently changed their code action from using inline popup (like a context menu) to quick panel.
This gives me some pain when I try to auto import stuff.
The problem is roughly like this: I trigger auto import (code action) from LSP, it pops up a quick panel, which causes loss of focus from the file, it auto saves and triggers auto format, and the auto import becomes invalid (either because of request id or code change), choosing from the panel ends with up being a noop. I have to repeat what I just did, or explicitly save beforehand, which loses the point of auto save
Steps to reproduce
Set the setting to true
change a file
open command palette
back to the file and the file is saved (has been auto saved because of focus lost)
Expected behavior
Do not treat opening command palette / quick panel as focus lost, or do not kickoff auto save.
Actual behavior
Opening command palette / quick panel causes focus loss and triggers auto save.
Environment
Build: 4102
Operating system and version: Win10
The text was updated successfully, but these errors were encountered:
Possible duplicate of #980. The issue described seems to be same (or similar) to point 5 of the linked issue (which seems to be a general collection of all issues associated with save_on_focus_lost)
Description
There is this setting in Sublime Text
The current behavior actually does do what the setting says, auto saves when focus is lost.
However, it doesn't really match what the comment says, or the comment is at least ambiguous.
As the comment suggests, auto save should only kick in when you switch to a different file or window.
The fact is it's also triggered when you open command palette / quick panel.
This leads to some inconvenience.
I have save_on_focus_lost: true + auto format on save from various package (prettier/LSP)
And LSP recently changed their code action from using inline popup (like a context menu) to quick panel.
This gives me some pain when I try to auto import stuff.
The problem is roughly like this: I trigger auto import (code action) from LSP, it pops up a quick panel, which causes loss of focus from the file, it auto saves and triggers auto format, and the auto import becomes invalid (either because of request id or code change), choosing from the panel ends with up being a noop. I have to repeat what I just did, or explicitly save beforehand, which loses the point of auto save
Steps to reproduce
Expected behavior
Do not treat opening command palette / quick panel as focus lost, or do not kickoff auto save.
Actual behavior
Opening command palette / quick panel causes focus loss and triggers auto save.
Environment
The text was updated successfully, but these errors were encountered: