Repository navigation
add option to close editor window on save - #15
kevintraver wants to merge 2 commits into
Conversation
Optimized the `onDocumentClose` function in the VSCode extension to manage the programmatic closure of text editors more effectively. Changes: - Moved the `isAutoClosingEditor` check to the top, ensuring early exit if an editor closure is programmatic. - The `isAutoClosingEditor` flag is now set immediately before the programmatic closure of the editor, ensuring precise tracking of such events. This refactor enhances the reliability of the editor closure mechanism and simplifies the logic flow for better maintainability.
|
Ok, looking this over more, it seems like there is no easy way to determine which of these scenarios actually trigger the onDidCloseTextDocument event:
|
|
As mentioned:
What you want to listen to is the disconnection event specifically (see the If you are already in the editor, you can disconnect by closing the tab, so I'm not sure this will get you what you want in the end. |
|
Ok, what about something like this: set a new configuration option set up a new event listener for and then close on save |
|
The only problem I'm having is |
No. It's a bug and it will be fixed. |
|
I'll go ahead and close this out. |
Ensure text editor closes programmatically on document save, eliminating the need to manually close lingering windows.