editor: auto-save on Esc instead of the discard prompt#17
Closed
jrdntnnr wants to merge 1 commit into
Closed
Conversation
Closing a modified buffer with Esc previously required a two-step "Unsaved! Ctrl+S:Save Esc:Discard" confirmation, where a reflexive second Esc silently threw away the edits. Auto-save instead: a named file is saved in place; a never-saved buffer is written under a generated draft name (the same generator the Save dialog uses, so it can be renamed later). Only if the save itself fails (SD card missing or full) do we fall back to the original two-step discard prompt, so work is never lost silently nor trapped in the editor. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Owner
|
we still need to give the user a possibility to exit the editor without saving. Probably, a proper dialog, like "Save? yes/no", would be more intuitive. |
Owner
|
I'll add a proper dialog |
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.
What this does
Changes the editor's Esc-to-close behavior from a discard-confirmation prompt to auto-save.
Previously, pressing Esc on a modified buffer showed
Unsaved! Ctrl+S:Save Esc:Discard, and a reflexive second Esc silently discarded the edits. Now:Board-agnostic editor UX change. Build-verified on ESP-IDF 5.5. Split out of #14 per maintainer request (this was a general behavior change bundled in the H752 branch; raising it separately so it can be reviewed on its own merits).