[PR #16001] Fix enter to restart the first pane in a split #30801

Closed
opened 2026-01-31 09:43:03 +00:00 by claunia · 0 comments
Owner

Original Pull Request: https://github.com/microsoft/terminal/pull/16001

State: closed
Merged: Yes


I noticed this last week, but forgot to file. If you have a pair of splits, and exit -1 the first, you can't use enter to restart it.

This PR fixes that. Basically, TerminalPage registers it's _restartPaneConnection handler when it makes a new Pane object. It registers the callback straight to the Pane. However, when a Pane gets split, it makes a new Pane object, and moves the original content into the new pane. TerminalPage however, would never hook up its own callback to that newly created pane.

This fixes that.

**Original Pull Request:** https://github.com/microsoft/terminal/pull/16001 **State:** closed **Merged:** Yes --- I noticed this last week, but forgot to file. If you have a pair of splits, and `exit -1` the first, you can't use `enter` to restart it. This PR fixes that. Basically, `TerminalPage` registers it's `_restartPaneConnection` handler when it makes a new `Pane` object. It registers the callback straight to the `Pane`. However, when a `Pane` gets split, it makes a _new_ `Pane` object, and moves the original content into the new pane. `TerminalPage` however, would never hook up its own callback to that newly created pane. This fixes that.
claunia added the pull-request label 2026-01-31 09:43:03 +00:00
Sign in to join this conversation.
No Label pull-request
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#30801