Kill the partially created buffer when terminal creation quits#537
Closed
dakra wants to merge 2 commits into
Closed
Kill the partially created buffer when terminal creation quits#537dakra wants to merge 2 commits into
dakra wants to merge 2 commits into
Conversation
ghostel--create cleaned up after errors but not after C-g: quit is not a subtype of error, so a keyboard quit during initialization (e.g. at a dir-locals prompt in ghostel-mode) left behind an empty ghostel-mode buffer with no terminal and no process.
The test typed "abc" and required it to vanish from the screen after a backspace. fish's default prompt shows the checkout's VCS state, which on the detached HEAD CI tests is the short merge-commit sha — PR merge shas containing "abc" (like babcf18) kept the marker permanently on screen and timed the test out. Type "wxyz" instead: letters outside [0-9a-f] can never appear in a sha.
Owner
Author
|
merged into main |
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.
ghostel--createcleans up aftererrorbutquitis not a subtype oferror, so a keyboard quit during initialization — e.g. answeringC-gto a dir-locals prompt whileghostel-moderunshack-dir-local-variables— skipped the cleanup and left behind an emptyghostel-modebuffer with no terminal and no process (a blank*ghostel*<N>husk that plainM-x ghostelnever reuses, since it has no buffer identity).The handler now catches
(error quit), killing the partial buffer before re-signaling.The regression test signals
quitfrom inside initialization and asserts no buffer survives; it usescondition-casedirectly because ERT'sshould-erroronly trapserror. Verified to fail without the fix.