[PR #2494] Clean up Pane #24958

Open
opened 2026-01-31 09:06:22 +00:00 by claunia · 0 comments
Owner

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

State: closed
Merged: Yes


Cleanup of Pane.cpp based on conversations in #2450

Summary of the Pull Request

  • Merging of all Split{Horizontal,Vertical} methods into a single method that accepts Pane::SplitState
  • Rename Tab::(Can)AddSplit to (Can)SplitPane to keep the verb/noun usage consistent with Pane.cpp
  • Cleanup of a few other Pane methods, mostly removing unnecessarily nested else statements where the if always returns

When reviewing, it might be easier to split into renames and tidy up

Each change has been committed separately to make them easier to rebase out if you're not happy with them, but feel free to squash them when merging.

References

#2450

PR Checklist

  • Closes #xxx (not directly related to an issue)
  • CLA signed. If not, go over here and sign the CLA
  • Tests added/passed (N/A - there are no tests for Pane.cpp)
  • Requires documentation to be updated
  • I've discussed this with core contributors already. If not checked, I'm ready to accept this work might be rejected in favor of a different grand plan. Issue number where discussion took place: #2450

Detailed Description of the Pull Request / Additional comments

All covered by the "Summary" above.

Validation Steps Performed

Simple usage of the terminal, and hammering the split feature to ensure it still works (including the previously fixed crash fixed by #2450)

**Original Pull Request:** https://github.com/microsoft/terminal/pull/2494 **State:** closed **Merged:** Yes --- Cleanup of Pane.cpp based on conversations in #2450 ## Summary of the Pull Request * Merging of all `Split{Horizontal,Vertical}` methods into a single method that accepts `Pane::SplitState` * Rename `Tab::(Can)AddSplit` to `(Can)SplitPane` to keep the verb/noun usage consistent with Pane.cpp * Cleanup of a few other Pane methods, mostly removing unnecessarily nested `else` statements where the `if` always returns When reviewing, it might be easier to split into [renames](https://github.com/microsoft/terminal/pull/2494/files/76ff6850051bdd2a14fe97b3230124832528af90) and [tidy up](https://github.com/microsoft/terminal/pull/2494/files/76ff6850051bdd2a14fe97b3230124832528af90..a09a5917783689b6e7c7895887cba92587390ade) Each change has been committed separately to make them easier to rebase out if you're not happy with them, but feel free to squash them when merging. ## References #2450 <!-- Please review the items on the PR checklist before submitting--> ## PR Checklist * [ ] Closes #xxx (not directly related to an issue) * [x] CLA signed. If not, go over [here](https://cla.opensource.microsoft.com/microsoft/Terminal) and sign the CLA * [ ] Tests added/passed (N/A - there are no tests for Pane.cpp) * [ ] Requires documentation to be updated * [x] I've discussed this with core contributors already. If not checked, I'm ready to accept this work might be rejected in favor of a different grand plan. Issue number where discussion took place: #2450 ## Detailed Description of the Pull Request / Additional comments All covered by the "Summary" above. ## Validation Steps Performed Simple usage of the terminal, and hammering the split feature to ensure it still works (including the previously fixed crash fixed by #2450)
claunia added the pull-request label 2026-01-31 09:06:22 +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#24958