[PR #825] [MERGED] Add support for multiple panes in the same window #24325

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

📋 Pull Request Information

Original PR: https://github.com/microsoft/terminal/pull/825
Author: @zadjii-msft
Created: 5/15/2019
Status: Merged
Merged: 6/7/2019
Merged by: @zadjii-msft

Base: masterHead: dev/migrie/f/panes


📝 Commits (10+)

  • 606dd57 Start working on adding support for panes
  • 91dc273 Add basic pane splitting
  • a600b20 This works for nesting panes
  • faaba47 Switching tabs keeps focus on the last active pane now
  • 9b792d3 Reload settings for the panes.
  • 7ca3e8d Get titles working again
  • db7523a Update the icon too
  • 7258a71 Pull these two guys into helpers
  • 29464ea Merge remote-tracking branch 'origin/master' into dev/migrie/f/panes
  • 377aa4f Hook up the terminal's closing to the pane's to the tab's

📊 Changes

14 files changed (+1368 additions, -125 deletions)

View changed files

doc/cascadia/Panes.md (+232 -0)
📝 src/cascadia/TerminalApp/App.cpp (+210 -69)
📝 src/cascadia/TerminalApp/App.h (+14 -0)
📝 src/cascadia/TerminalApp/AppKeyBindings.cpp (+9 -0)
📝 src/cascadia/TerminalApp/AppKeyBindings.h (+2 -0)
📝 src/cascadia/TerminalApp/AppKeyBindings.idl (+6 -0)
src/cascadia/TerminalApp/Pane.cpp (+586 -0)
src/cascadia/TerminalApp/Pane.h (+85 -0)
📝 src/cascadia/TerminalApp/Tab.cpp (+157 -33)
📝 src/cascadia/TerminalApp/Tab.h (+22 -12)
📝 src/cascadia/TerminalApp/TerminalApp.vcxproj (+2 -0)
📝 src/cascadia/TerminalControl/TermControl.cpp (+41 -11)
📝 src/cascadia/TerminalControl/TermControl.h (+1 -0)
📝 src/cascadia/TerminalControl/TermControl.idl (+1 -0)

📄 Description

image

This is probably good enough to PR, but might not be polished enough to ship quite yet. There's a LOT of work to still do one panes, even after this is checked in. See #1000 for the megathread of all panes related issues.

Things that might need todo's, and what issue they're linked to:

  • Clicking on a pane focuses it, but also starts a selection. This is probably #670
  • You can tab between panes. That's obviously unwanted. This is also related to #744
  • If you click on the separator's between panes, then on panes will be focused. Related to #528 but definitely different. #999
  • You can't resize panes. They're always 50% of their parent. #991 profiles.json formatting lost on save (#992)
  • You have to exit the shell to close the pane, there's no shortcut for "ClosePane" #993
  • You can only open a pane with the default profile #998
    • I left space for adding support for opening a specific pane, but it didn't really seem like there was a good keychord for doing this currently. Maybe if we added support for multi-key keychords, then it'd make more sense.
  • There's no real UI to indicate that a particular pane is focused, other than the blinking cursor. #994
  • You can't navigate the focus of panes with the keyboard currently. #995
  • I'm not sure Ctrl+Shift+plus and Ctrl+Shift+- are the right combo for splitting. Maybe we move them to Alt+Shift+plus/-
    • This would nicely fit with Alt+Shift+Arrows to navigate focus.
    • I'm removing the default keybinding entirely. If people want to start using this experimental feature, they can add the keybinding manually. The fundamentals of this PR should be in sooner than later, but the feature probably isn't ready for most people yet.

I'm pretty sure most of these don't need to be addressed in the initial PR, and can have follow-up tasks created, but they're all important to note.

This pretty aggressively touches Tab.cpp and App.cpp. App.cpp was doing a lot of work that assumed there was one control per tab. I figured that getting the structure in now would be beneficial, before we add any more code that assumes that.

Closes #532


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/microsoft/terminal/pull/825 **Author:** [@zadjii-msft](https://github.com/zadjii-msft) **Created:** 5/15/2019 **Status:** ✅ Merged **Merged:** 6/7/2019 **Merged by:** [@zadjii-msft](https://github.com/zadjii-msft) **Base:** `master` ← **Head:** `dev/migrie/f/panes` --- ### 📝 Commits (10+) - [`606dd57`](https://github.com/microsoft/terminal/commit/606dd576cc83ad7e3284a9a1e971b5568c72a71e) Start working on adding support for panes - [`91dc273`](https://github.com/microsoft/terminal/commit/91dc273591cc030dbf95577fd98768a480bdb50c) Add basic pane splitting - [`a600b20`](https://github.com/microsoft/terminal/commit/a600b204a5939d9df14b6bbc3d7aeaee61ec5f51) This works for nesting panes - [`faaba47`](https://github.com/microsoft/terminal/commit/faaba470aaf1c8e42983509144bb614d5bc1dd30) Switching tabs keeps focus on the last active pane now - [`9b792d3`](https://github.com/microsoft/terminal/commit/9b792d3faf9f4bb28166ced8acd8b488369e3074) Reload settings for the panes. - [`7ca3e8d`](https://github.com/microsoft/terminal/commit/7ca3e8df2c5c4c93f18c941df6b3e9940a212614) Get titles working again - [`db7523a`](https://github.com/microsoft/terminal/commit/db7523af84cf45198873922d24ae575060c93df4) Update the icon too - [`7258a71`](https://github.com/microsoft/terminal/commit/7258a7179c47fd8a348e843839e016e6e4054d11) Pull these two guys into helpers - [`29464ea`](https://github.com/microsoft/terminal/commit/29464ea32b451642e3429b983e0edcc6991cb950) Merge remote-tracking branch 'origin/master' into dev/migrie/f/panes - [`377aa4f`](https://github.com/microsoft/terminal/commit/377aa4f3053ebfeb18f3a867c246ea3a90a1eab9) Hook up the terminal's closing to the pane's to the tab's ### 📊 Changes **14 files changed** (+1368 additions, -125 deletions) <details> <summary>View changed files</summary> ➕ `doc/cascadia/Panes.md` (+232 -0) 📝 `src/cascadia/TerminalApp/App.cpp` (+210 -69) 📝 `src/cascadia/TerminalApp/App.h` (+14 -0) 📝 `src/cascadia/TerminalApp/AppKeyBindings.cpp` (+9 -0) 📝 `src/cascadia/TerminalApp/AppKeyBindings.h` (+2 -0) 📝 `src/cascadia/TerminalApp/AppKeyBindings.idl` (+6 -0) ➕ `src/cascadia/TerminalApp/Pane.cpp` (+586 -0) ➕ `src/cascadia/TerminalApp/Pane.h` (+85 -0) 📝 `src/cascadia/TerminalApp/Tab.cpp` (+157 -33) 📝 `src/cascadia/TerminalApp/Tab.h` (+22 -12) 📝 `src/cascadia/TerminalApp/TerminalApp.vcxproj` (+2 -0) 📝 `src/cascadia/TerminalControl/TermControl.cpp` (+41 -11) 📝 `src/cascadia/TerminalControl/TermControl.h` (+1 -0) 📝 `src/cascadia/TerminalControl/TermControl.idl` (+1 -0) </details> ### 📄 Description ![image](https://user-images.githubusercontent.com/18356694/57789427-82382880-76fe-11e9-8c3e-d84fbf5a4f97.png) This is probably good enough to PR, but might not be polished enough to ship quite yet. There's a LOT of work to still do one panes, even after this is checked in. See #1000 for the megathread of all panes related issues. Things that might need todo's, and what issue they're linked to: * [x] Clicking on a pane focuses it, but also starts a selection. This is probably #670 * [x] You can tab between panes. That's obviously unwanted. This is also related to #744 * [ ] If you click on the separator's between panes, then on panes will be focused. Related to #528 but definitely different. #999 * [ ] You can't resize panes. They're always 50% of their parent. #991 #992 * [ ] You have to exit the shell to close the pane, there's no shortcut for "ClosePane" #993 * [ ] You can only open a pane with the default profile #998 - I left space for adding support for opening a specific pane, but it didn't really seem like there was a good keychord for doing this currently. Maybe if we added support for multi-key keychords, then it'd make more sense. * [ ] There's no real UI to indicate that a particular pane is focused, other than the blinking cursor. #994 * [ ] You can't navigate the focus of panes with the keyboard currently. #995 * [x] I'm not sure Ctrl+Shift+plus and Ctrl+Shift+- are the right combo for splitting. Maybe we move them to Alt+Shift+plus/- - This would nicely fit with Alt+Shift+Arrows to navigate focus. - **I'm removing the default keybinding entirely.** If people want to start using this _experimental_ feature, they can add the keybinding manually. The fundamentals of this PR should be in sooner than later, but the feature probably isn't ready for most people yet. I'm pretty sure most of these don't need to be addressed in the initial PR, and can have follow-up tasks created, but they're all important to note. This pretty aggressively touches Tab.cpp and App.cpp. App.cpp was doing a lot of work that assumed there was one control per tab. I figured that getting the structure in now would be beneficial, before we add any more code that assumes that. Closes #532 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
claunia added the pull-request label 2026-01-31 09:02:37 +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#24325