feat: Ask user to save the file before they close the tab #280#289
Merged
tomlin7 merged 5 commits intotomlin7:mainfrom Apr 13, 2024
Merged
feat: Ask user to save the file before they close the tab #280#289tomlin7 merged 5 commits intotomlin7:mainfrom
tomlin7 merged 5 commits intotomlin7:mainfrom
Conversation
Remove unnecessary comments
Owner
|
@vyshnav-vinod the code is all good really nice, but we can move that to the components part from the layout part. I have also included a save_as option when the opened file doesn't exist |
Owner
|
@vyshnav-vinod this now also handles app destroyed event, and checks for unsaved changes |
Owner
|
once again, @vyshnav-vinod thanks for the contribution! ❤️ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
fix #280
In your comment, you also mentioned the idea of making a whole app destroy event. I have not implemented it in here, but i guess when the whole app is closed/destroyed, we can get the list of active editors and then just manually close them? I guess closing them will trigger the close_tab() function of the tabs and it should trigger the save dialog??