-
Notifications
You must be signed in to change notification settings - Fork 8.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for multiple panes in the same window #825
Conversation
* adds two keybindings, Ctrl+Shift++ and Ctrl+Shift+- for horizontal and vertical split, respectively. * Splits only open the default profile - This should probably be a setting, whether to use the default or a new copy of the current pane. There should also be a keystroke for opening a pane with a specific profile. * Only supports one pane ATM. * need to figure out which control is actively focused. Having an IsFocused method on the TermControl seems wrong.
Moving focus between panes is still a janky - selection isn't dismissed when the TermControl loses focus, and the cursor remains visible. Switching to a tab with panes doesn't focus _any_ control, so that's bad.
On reload of settings, change the icon of the tab to that of the last focused pane
# Conflicts: # src/cascadia/TerminalApp/App.cpp # src/cascadia/TerminalApp/AppKeyBindings.cpp # src/cascadia/TerminalApp/AppKeyBindings.idl
But something seems fucky with the closing of the tabs. I'm getting crashes, when I close with `exit` from the commandline and `closeOnExit:true`, but I don't think it has anything to with my change. Gonna mess with master and see if it's busted.
…ably _more_ wrong.
…t's probably _more_ wrong." This reverts commit 23930b5.
Will those panes need their own TabView controls? I am assuming these panes are live consoles, and not just an area to pin/copy output for easy reference, as per #644 which I submitted? |
@mdtauk That's correct, these are full terminal instances. @DHowett-MSFT and I previously discussed the merits of having top-level tabs and then nested panes vs toplevel panes with nested tabs, and felt that toplevel tabs (similar to tmux) would be the better UX. If each pane had it's own tabview, that would result in a good amount of window real estate being dedicated to just displaying tabs. This could in the future be used to support pinning content in a new pane. Theoretically you don't even need to limit it to another terminal control in the pane (though this PR is definitely limited to a terminal in the pane). I'll leave that discussion for #644. |
Wow! Phone thoughts before reviewing:
Neither of those characters have a direct VT representation, I believe? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- I'd love to see a design doc on this go into docs/specs; it'll be good to get a quick overview of why it works the way it does.. and also what "the way it does" is.
- Should
SplitVertical
/Horizontal
beAddSplit(const Pane::SplitState)
?
That's super creative and I love it if it doesn't conflict with a VT sequence. |
I am assuming there will be keyboard shortcuts for creating these panes. Might I suggest they be added to the Context Menu also. |
# Conflicts: # src/cascadia/TerminalApp/App.cpp # src/cascadia/TerminalApp/AppKeyBindings.cpp
My only qualm with https://docs.microsoft.com/en-us/windows/desktop/inputdev/virtual-key-codes
So it'll work great on EN-US, but I don't know about other locales. I really like that My thinking with moving to Alt+Shift+plus and Alt+Shift+- ( Actually, playing with this more, |
# Conflicts: # src/cascadia/TerminalApp/AppKeyBindings.cpp
|
||
#pragma once | ||
#include <winrt/Microsoft.Terminal.TerminalControl.h> | ||
#include "../../cascadia/inc/cppwinrt_utils.h" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
alarming
Don't capture a dead reference Co-Authored-By: Dustin L. Howett (MSFT) <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's try and write code in github
When this can be expected on Insiders update? |
@whitecolor this is in the version that's currently available on the Store. You need to add |
@zadjii-msft I tried it so a little buggy but actually may work)
|
@whitecolor Not yet, but most of these are being tracked by #1000 |
Is there any possibility to custom the style of the splitter? |
@Weilet Not currently. I'll direct your attention to:
And others listed in #1000 |
Amazing feature 👍 |
@zadjii-msft exactly 💯 |
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:
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