-
Notifications
You must be signed in to change notification settings - Fork 13
Description
The extension is not cleaning up extra blank lines when VS Code auto saves the file. The cleanup only happens when I explicitly save with Ctrl+S.
I use VS Code auto save set to save on focus change (when I click out of the file). With that setup, the extension does not format or remove extra blank lines on auto save, but does work correctly when I press Ctrl+S.
Current behavior
- With
files.autoSaveset toonFocusChange - Extra blank lines or other cleanup targets stay in the file when I switch focus to another editor or file
- If I then press
Ctrl+Smanually, the extension runs and cleans up the file as expected
Expected behavior
The same cleanup that happens on a manual save with Ctrl+S should also run when VS Code auto saves on focus change, so the file is always cleaned up whenever VS Code saves it.
Steps to reproduce
- Enable the extension
- Set VS Code setting
files.autoSavetoonFocusChange - Open a TypeScript file
- Add some extra blank lines that the extension would normally remove
- Click into another file or editor so that VS Code auto saves the file
- Observe that the extra lines are still there
- Press
Ctrl+S - Observe that now the extension runs and the extra lines are removed
Environment
Version: 1.105.1 (user setup)
Commit: 7d842fb85a0275a4a8e4d7e040d2625abbf7f084
Date: 2025-10-14T22:33:36.618Z
Electron: 37.6.0
ElectronBuildId: 12502201
Chromium: 138.0.7204.251
Node.js: 22.19.0
V8: 13.8.258.32-electron.0
OS: Windows_NT x64 10.0.22631
Extension version: Currently using the version from the PR #119
files.autoSave:onFocusChange