Skip to content

fix(terminal): say a dead pane is dead, and close it on Enter - #621

Merged
guillaumejay merged 4 commits into
mainfrom
fix/dead-pane-exit-banner
Nov 29, 2026
Merged

guillaumejay merged 4 commits into
mainfrom
fix/dead-pane-exit-banner

Conversation

@guillaumejay

Copy link
Copy Markdown
Collaborator

Closes #620

A pane kept open after an unclean exit looked alive: cursor drawn, no sign
the process was gone. Under cmd.exe a bare exit after a failed command
returns its error level (9009 for an unknown command), so an ordinary
exit hit this.

  • pty: the waiter forwards the exit code; on an unclean exit the terminal
    thread writes [process exited with code N. Press Enter to close] after
    the drain, before the final snapshot.
  • core: TerminalInput of \r into an Exited session closes its pane;
    any other input stays a no-op.
  • Book (workspace/tabs-and-splits.md) and CHANGELOG.md updated.

Tests: an_unclean_exit_writes_its_code_under_the_last_screen (real PTY,
exit 3), exit_banner_names_the_code_and_how_to_close, and the core
lifecycle test now asserts Enter closes the dead pane. Ran fmt, workspace
clippy, and tests for core, pty and app locally on Windows.

A pane kept open after an unclean exit kept its cursor and looked like a
live prompt. Under cmd.exe a bare `exit` after a failed command returns
its error level, so an ordinary `exit` left such a pane behind.

The terminal thread now writes "[process exited with code N. Press Enter
to close]" under the last output, and Enter in an exited session closes
its pane.

Closes #620
@guillaumejay
guillaumejay merged commit 38529c8 into main Nov 29, 2026
12 checks passed
@guillaumejay
guillaumejay deleted the fix/dead-pane-exit-banner branch November 29, 2026 17:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

A pane kept open after an unclean exit looks alive

1 participant