-
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
Move Pane to Tab (GH7075) #10780
Move Pane to Tab (GH7075) #10780
Conversation
…l of the vestigial event handlers when we switch which tab owns a pane.
- First (not-really-functional) pass at adding move pane to tab functionality. Moving a pane to a new tab seems to work. Everything else is questionable (exceptions abound). - Set up {Attach,Detach}Pane methods to add or remove a pane from a pane. Detach is slightly different than Close in that we want to persist the tree structure and terminal controls. - Add `Detached` event on a pane that can be subscribed to to remove other event handlers if desired. Still need to figure out how to handle removing unwanted event handlers on the actual terminal control. - Added simple WalkTree abstraction for one-off recursion use cases that calls a provided function on each pane in order (and optionally terminates early).
…handlers are removed when a tab gets closed as well. Try to keep active state updated when detaching
fyi the team probably won't get around to reviewing PRs this week. I don't want you to get the impression we're ignoring you 😝 |
…xtra closed handlers if we are moving the root element from a tab. Make sure that we preserve the ids when we attach a child from another tab.
…ane-to-tab Conflicts: doc/cascadia/profiles.schema.json src/cascadia/TerminalApp/Pane.h src/cascadia/TerminalApp/TabManagement.cpp
merged in |
…ane-to-tab Conflicts: src/cascadia/TerminalApp/TerminalTab.cpp src/cascadia/TerminalSettingsModel/AllShortcutActions.h
…hat kind of split is being made when a pane is attached (so that in the future it doesnt have to always be an automatic split)
@check-spelling-bot ReportUnrecognized words, please review:
Previously acknowledged words that are now absentSPACEBAR UnregisterTo accept these unrecognized words as correct (and remove the previously acknowledged and now absent words), run the following commands... in a clone of the [email protected]:Rosefield/terminal.git repository
✏️ Contributor please read thisBy default the command suggestion will generate a file named based on your commit. That's generally ok as long as you add the file to your commit. Someone can reorganize it later.
If the listed items are:
See the 🔬 You can test your commits without appending to a PR by creating a new branch with that extra change and pushing it to your fork. The check-spelling action will run in response to your push -- it doesn't require an open pull request. By using such a branch, you can limit the number of typos your peers see you make. 😉 🗜️ If you see a bunch of garbageIf it relates to a ... well-formed patternSee if there's a pattern that would match it. If not, try writing one and adding it to a Patterns are Perl 5 Regular Expressions - you can test yours before committing to verify it will match your lines. Note that patterns can't match multiline strings. binary-ish stringPlease add a file path to the File paths are Perl 5 Regular Expressions - you can test yours before committing to verify it will match your files.
|
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.
Okay, I think this looks great. I need to socialize the commandline here a bit with the rest of the team to see what they think. Overall, I think this is a great PR and sets us up well for some really great features in the future!
(only blocking for the team discussion, usually mondays)
void AppCommandlineArgs::_buildMovePaneToTabParser() | ||
{ | ||
_movePaneToTabCommand = _app.add_subcommand("move-pane-to-tab", RS_A(L"CmdMovePaneToTabDesc")); | ||
_movePaneToTabShort = _app.add_subcommand("mptt", RS_A(L"CmdMPTTDesc")); |
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.
Alright so this is a wack idea that might need socializing with the rest of the team, but I wonder if it would make sense to just combine this functionality with the move-pane
action? Thoughts on the matter:
mptt
is kinda a black swan here - all the other short forms are two characters.- for something like
mp -t 0
, the long form could actually just be--tab
🤔 mp -t 0 left
now is a little weird, "move the pane to tab 0 (to the left???)" That doesn't make sense. The two options (direction
and--tab
) would have to be exclusive- It's probably not that insane to have two actions (
MovePane
andMovePaneToTab
) that are exposed through a single commandline interface. - (as a follow up idea:) we could do something like
move-pane --tab 0 --parent 4
which would move the pane to be a sibling of pane 4 in tab 0.
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.
Ultimately, I don't have a strong preference either way since I currently don't plan on using the command line version at all. If there is a desired change to the command line parsing I can try to figure out how to implement it.
One of the other things I was thinking about while implementing this is, especially forward looking, that you could have a target pane, and a SplitStyle
. E.g. if directional split and drag and drop is added, the underlying command might be like "move pane to tab 2, with target pane 5, split and place on the left side." That is at least a couple of features away, so I don't know how much it makes sense it build that in quite yet. As for the command line interface for such a feature, I'm not sure if it needs to be so involved, but I also just don't know the use case.
I think one of the possible issues is that the naming here is not quite consistent with intent (and I am at fault for that). move-pane
actually is swap-panes
in that it switches positions of two things, whereas move-pane-to-tab
takes the current pane and puts it somewhere else, and otherwise doesn't disrupt the positioning of other panes.
For a last thought, I am comfortable with vim and its notion of commands and movements being separate. Here, commands would be like move-focus
, move-pane
, move-pane-to-tab
, etc, and the movements/targets would be like left
or previous
or pane with id 1 on tab 3
. If everything were to be rearchitected in this style, we could have more of the "command" style things just take Pane
s as arguments, and then hypothetically a command like move-focus
could gain new abilities if we added a first pane
or neighbor of parent
"movement" (or just be removed outright in favor of focus-pane
). Such a change is of course highly subject to opinion and would require more discussion.
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.
You've definitely got some good points here. I think the
move-pane
actually isswap-panes
in that it switches positions of two things
bit is definitely a specifically good argument. Almost seems like we should rename the existing move-pane
to swap-pane
, but then that wouldn't be able to have a two-letter short form, so that's annoying.
However, in the team discussion we had, I think the general consensus was to have this be exposed as move-pane --tab <id>
. The commandline is kinda it's own UX, and the consensus was that move-pane-to-tab
didn't really feel ergonomic. That, and we were thinking about maybe in the future of something like move-pane --window 2
or something like move-pane -w new
. (admittedly, that's all waiting on #1256 and #5000). Those commands seemed pretty clear in what they were trying to do, and simpler than the equivalent move-pane-to-window -t 2
.
Lemme double check with the tmux
man pages. They have pretty good precedent for all this usually.
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.
Would it be fine to just merge the command line portion and have that call the separate actions, or should there be a higher level of integration?
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.
Okay so taking a look at the man pages:
tmux man page selection
join-pane [-bdfhv] [-l size] [-s src-pane] [-t dst-pane]
(alias: joinp)
Like split-window, but instead of splitting dst-pane and
creating a new pane, split it and move src-pane into the
space. This can be used to reverse break-pane. The -b
option causes src-pane to be joined to left of or above
dst-pane.
move-pane [-bdfhv] [-l size] [-s src-pane] [-t dst-pane]
(alias: movep)
Does the same as join-pane.
select-pane [-DdeLlMmRUZ] [-T title] [-t target-pane]
(alias: selectp)
Make pane target-pane the active pane in its window. If
one of -D, -L, -R, or -U is used, respectively the pane
below, to the left, to the right, or above the target pane
is used...
swap-pane [-dDUZ] [-s src-pane] [-t dst-pane]
(alias: swapp)
Swap two panes. If -U is used and no source pane is
specified with -s, dst-pane is swapped with the previous
pane (before it numerically); -D swaps with the next pane
(after it numerically).
So they definitely don't allow move-pane -t 4 left
, because that's nonsensical. "move the pane to tab 4, then move it left"?
Maybe we should follow their lead on this one.
swap-pane [up|down|left|right|prev|nextInOrder|prevInOrder]|[-t,--target tgt-pane]
- This is what we've already got as
move-pane
, so this would be a rename, but without a short form (sad, but okay) - obviously, we'd add the
nextInOrder
(etc) values after Allow moving through panes in ID order #10909 - and we'd add the
-t
argument in another PR, as an exclusive arg with the direction
- This is what we've already got as
move-pane [-t,--tab index]
: move the pane to the given tab. Ifindex
isnew
, then moves it to a new tab.- in the future we'd add
[-w,--window id]
for moving to another window. - we could add additional params for like,
[-d,--destination pane-id]
: split the given destination pane rather than the active pane in the tab
- in the future we'd add
and I suppose with both we could ass a [-s,--source pane-id]
arg as well.
I might just be openly brainstorming at this point. What do you think? we haven't shipped move-pane
yet, so we're definitely still free to change it if we feel there's a better name
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.
Would it be fine to just merge the command line portion and have that call the separate actions, or should there be a higher level of integration?
Yea we definitely thought it was okay to do that. Having two actions internally for one subcommand is kinda weird, but is definitely easier to deal with logically than trying to combine them into one args blob with optional properties and all that.
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'm happy to rename move-pane
to swap-pane
and move-pane-to-tab
to move-pane,
or to just make it all move-pane
just let me know. Bit annoying to dig through all the resource files again but its not too bad.
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.
FWIW, the team did feel that we should just do it all on move-pane
, I've just been brainstorming myself over here since re-reading this thread this morning.
I'm trying to think of all the moving things we want to do with panes, and coming up with a single command that looks like... this?
move-pane(mp) [--window,-w window-id] [--source,-s src-pane] [--tab,-t index]|[up|down|left|right|prev|nextInOrder|prevInOrder]|[--destination,-d dest-pane]
- we want to move panes to other tabs
- we want to move panes to other windows
- we want to swap a pane with another pane, by ID
- we want to move a pane in a given direction (we want to swap it in a direction)
- we want to be able to move the active pane, or a specific pane in a tab
and I think all that together means that we want to
- swap with a (source)? and (a tgt or a direction)
- move with a (source)? and (a tab)? and (a tgt pane)?
and if these were all on one command, then I don't think it works. We'd need tab
and direction
to be exclusive to differentiate between 1 and 2. But then direction
and dest
would need to be exclusive for swap, but not exclusive for move, and now the rules don't work.
So in conclusion, yea:
rename
move-pane
toswap-pane
andmove-pane-to-tab
tomove-pane
(sorry for the runaround on all this!)
// - true if the predicate returned true on any pane. | ||
template<typename F> | ||
//requires std::predicate<F, std::shared_ptr<Pane>> | ||
bool WalkTree(F f) |
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.
this is very clever, I love it
…y (e.g. make tab into pane). Make Pane::DetachPane take a pointer to a pane so that any pane can be detached instead of just ones with ids.
Out of curiosity, what is the stabilization process like? I know that releases happen every 6 weeks, with the next one in ETA ~20 days, but I don't know how soon things need to be merged/how long they need to sit on |
…ane-to-tab Conflicts: src/cascadia/TerminalApp/TerminalPage.cpp src/cascadia/TerminalApp/TerminalPage.h
Yep, my bad 😋 |
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.
This looks great! Thanks!
There's a few const
that can be sprinkled around, but that's all I found.
Oh! Don't forget to update the docs too! https://github.com/MicrosoftDocs/terminal |
…or state after it has been set to nullptr when closing the tab
Created documentation updates for all of the features I worked on. |
I believe this is ready to merge? |
@msftbot merge this in 5 minutes |
Hello @carlos-zamora! Because you've given me some instructions on how to help merge this pull request, I'll be modifying my merge approach. Here's how I understand your requirements for merging this pull request:
If this doesn't seem right to you, you can tell me to cancel these instructions and use the auto-merge policy that has been configured for this repository. Try telling me "forget everything I just told you". |
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.
Just wanted to say that this is really, really clever. I love it. Well done and thank you!
🎉 Handy links: |
* Update to change equal symbol to plus key Addresses issue #196 *On my Surface Book keyboard + and = are the same key, but this may not be the case for all keyboard layouts. * change + to plus as shipped by default * Add notes about title change persistance * Update settings.json section * Link settings.json mentions * Fix links * fix a few more links * Update TerminalDocs/customize-settings/actions.md Co-authored-by: Kayla Cinnamon <[email protected]> * Update TerminalDocs/dynamic-profiles.md Co-authored-by: Kayla Cinnamon <[email protected]> * Update TerminalDocs/customize-settings/actions.md Co-authored-by: Kayla Cinnamon <[email protected]> * Remove repititious section * Added browser media keys (#371) * Add link to what is command line shell video (#377) * add intenseTextStyle to the docs (#381) * Multiple new pane features (#383) Documentation for - microsoft/terminal#10713 - microsoft/terminal#10638 - microsoft/terminal#10780 - microsoft/terminal#10927 * wt.exe --window argument now available (#388) * Add notes that the `font` object is only 1.10+ (#389) Co-authored-by: Kayla Cinnamon <[email protected]> * Remove MinimizeToTray action mentions (#387) * Docs updates for 1.11 release (#397) * Specify OS version availability for defterm (#417) Co-authored-by: Kayla Cinnamon <[email protected]> * Remove tilde Reshttps://github.com/MicrosoftDocs/terminal/issues/260olves * Improve dup tab description #292 * Update minimizetotray setting to new name * Merge release 1.12 into master (#428) Co-authored-by: Kayla Cinnamon <[email protected]> Co-authored-by: Pankaj Bhojwani <[email protected]> Co-authored-by: Matt Wojciakowski <[email protected]> Co-authored-by: Mike Griese <[email protected]> Co-authored-by: Carlos Zamora <[email protected]> Co-authored-by: Schuyler Rosefield <[email protected]> Co-authored-by: PankajBhojwani <[email protected]> * Remove preview labels * Add redirect for old powerline page * Add vscode to gitignore * Config changes to reflect the default branch from master to main. * Add a note about the command palette to this doc (#447) * Add details about the command used to print the table (#446) * initialPos -> initialPosition (#445) * Add tip on extensions for configuration files (#440) * Add tip on extensions for configuration files Resolves #423 * fix numbering Co-authored-by: Matt Wojciakowski <[email protected]> * Corrected path (#434) The LocalAppData path was missing `{app-name}` * Update panes.md (#432) Minor edit on a shortcut key * Correct $PROFILE configuration (#431) When using winget, Oh-my-posh will not add Set-PoshPrompt to path, the execution will fail. The correct configuration can be found in https://ohmyposh.dev/docs/windows#replace-your-existing-prompt * Add a sample page (#444) * Add FAQ page (#442) * Add FAQ page * Finalize faq v1 * Replace md with yml, add toc * Update with settings UI feedback from kayla * fix image link * Fix preview faq Co-authored-by: Kayla Cinnamon <[email protected]> Co-authored-by: Floris Westerman <[email protected]> Co-authored-by: Mike Griese <[email protected]> Co-authored-by: Schuyler Rosefield <[email protected]> Co-authored-by: Sean Jacobs <[email protected]> Co-authored-by: Leon Liang <[email protected]> Co-authored-by: Carlos Zamora <[email protected]> Co-authored-by: Pankaj Bhojwani <[email protected]> Co-authored-by: PankajBhojwani <[email protected]> Co-authored-by: Nivaldo Tokuda <[email protected]> Co-authored-by: David A. Sjøen <[email protected]> Co-authored-by: tharindu sathischandra <[email protected]> Co-authored-by: Cutano <[email protected]>
* Update to change equal symbol to plus key Addresses issue #196 *On my Surface Book keyboard + and = are the same key, but this may not be the case for all keyboard layouts. * change + to plus as shipped by default * Add notes about title change persistance * Update settings.json section * Link settings.json mentions * Fix links * fix a few more links * Update TerminalDocs/customize-settings/actions.md Co-authored-by: Kayla Cinnamon <[email protected]> * Update TerminalDocs/dynamic-profiles.md Co-authored-by: Kayla Cinnamon <[email protected]> * Update TerminalDocs/customize-settings/actions.md Co-authored-by: Kayla Cinnamon <[email protected]> * Remove repititious section * Added browser media keys (#371) * Add link to what is command line shell video (#377) * add intenseTextStyle to the docs (#381) * Multiple new pane features (#383) Documentation for - microsoft/terminal#10713 - microsoft/terminal#10638 - microsoft/terminal#10780 - microsoft/terminal#10927 * wt.exe --window argument now available (#388) * Add notes that the `font` object is only 1.10+ (#389) Co-authored-by: Kayla Cinnamon <[email protected]> * Remove MinimizeToTray action mentions (#387) * Docs updates for 1.11 release (#397) * Specify OS version availability for defterm (#417) Co-authored-by: Kayla Cinnamon <[email protected]> * Remove tilde Reshttps://github.com/MicrosoftDocs/terminal/issues/260olves * Improve dup tab description #292 * Update minimizetotray setting to new name * Merge release 1.12 into master (#428) Co-authored-by: Kayla Cinnamon <[email protected]> Co-authored-by: Pankaj Bhojwani <[email protected]> Co-authored-by: Matt Wojciakowski <[email protected]> Co-authored-by: Mike Griese <[email protected]> Co-authored-by: Carlos Zamora <[email protected]> Co-authored-by: Schuyler Rosefield <[email protected]> Co-authored-by: PankajBhojwani <[email protected]> * Remove preview labels * Add redirect for old powerline page * Add vscode to gitignore * Config changes to reflect the default branch from master to main. * Add a note about the command palette to this doc (#447) * Add details about the command used to print the table (#446) * initialPos -> initialPosition (#445) * Add tip on extensions for configuration files (#440) * Add tip on extensions for configuration files Resolves #423 * fix numbering Co-authored-by: Matt Wojciakowski <[email protected]> * Corrected path (#434) The LocalAppData path was missing `{app-name}` * Update panes.md (#432) Minor edit on a shortcut key * Correct $PROFILE configuration (#431) When using winget, Oh-my-posh will not add Set-PoshPrompt to path, the execution will fail. The correct configuration can be found in https://ohmyposh.dev/docs/windows#replace-your-existing-prompt * Add a sample page (#444) * Add FAQ page (#442) * Add FAQ page * Finalize faq v1 * Replace md with yml, add toc * Update with settings UI feedback from kayla * fix image link * Fix preview faq * Add a guide for using OSC9;9 (#449) * I think this is everything we need. Pushing because I don't know if the image paths are right * This should fix the warnings * maybe fix the urls? * typos * Update TerminalDocs/tutorials/new-tab-same-directory.md Co-authored-by: Felix Christl <[email protected]> Co-authored-by: Matt Wojciakowski <[email protected]> Co-authored-by: Felix Christl <[email protected]> * Minor quake mode text update (#454) * DocuTune: Fix ms.topic values (#453) Co-authored-by: Kayla Cinnamon <[email protected]> Co-authored-by: Floris Westerman <[email protected]> Co-authored-by: Mike Griese <[email protected]> Co-authored-by: Schuyler Rosefield <[email protected]> Co-authored-by: Sean Jacobs <[email protected]> Co-authored-by: Leon Liang <[email protected]> Co-authored-by: Carlos Zamora <[email protected]> Co-authored-by: Pankaj Bhojwani <[email protected]> Co-authored-by: PankajBhojwani <[email protected]> Co-authored-by: Nivaldo Tokuda <[email protected]> Co-authored-by: David A. Sjøen <[email protected]> Co-authored-by: tharindu sathischandra <[email protected]> Co-authored-by: Cutano <[email protected]> Co-authored-by: Felix Christl <[email protected]> Co-authored-by: Alex Buck <[email protected]>
* Add powerline redirect (#439) * Add redirect for old powerline page * Add vscode to gitignore * Main > Live (#448) * Update to change equal symbol to plus key Addresses issue #196 *On my Surface Book keyboard + and = are the same key, but this may not be the case for all keyboard layouts. * change + to plus as shipped by default * Add notes about title change persistance * Update settings.json section * Link settings.json mentions * Fix links * fix a few more links * Update TerminalDocs/customize-settings/actions.md Co-authored-by: Kayla Cinnamon <[email protected]> * Update TerminalDocs/dynamic-profiles.md Co-authored-by: Kayla Cinnamon <[email protected]> * Update TerminalDocs/customize-settings/actions.md Co-authored-by: Kayla Cinnamon <[email protected]> * Remove repititious section * Added browser media keys (#371) * Add link to what is command line shell video (#377) * add intenseTextStyle to the docs (#381) * Multiple new pane features (#383) Documentation for - microsoft/terminal#10713 - microsoft/terminal#10638 - microsoft/terminal#10780 - microsoft/terminal#10927 * wt.exe --window argument now available (#388) * Add notes that the `font` object is only 1.10+ (#389) Co-authored-by: Kayla Cinnamon <[email protected]> * Remove MinimizeToTray action mentions (#387) * Docs updates for 1.11 release (#397) * Specify OS version availability for defterm (#417) Co-authored-by: Kayla Cinnamon <[email protected]> * Remove tilde Reshttps://github.com/MicrosoftDocs/terminal/issues/260olves * Improve dup tab description #292 * Update minimizetotray setting to new name * Merge release 1.12 into master (#428) Co-authored-by: Kayla Cinnamon <[email protected]> Co-authored-by: Pankaj Bhojwani <[email protected]> Co-authored-by: Matt Wojciakowski <[email protected]> Co-authored-by: Mike Griese <[email protected]> Co-authored-by: Carlos Zamora <[email protected]> Co-authored-by: Schuyler Rosefield <[email protected]> Co-authored-by: PankajBhojwani <[email protected]> * Remove preview labels * Add redirect for old powerline page * Add vscode to gitignore * Config changes to reflect the default branch from master to main. * Add a note about the command palette to this doc (#447) * Add details about the command used to print the table (#446) * initialPos -> initialPosition (#445) * Add tip on extensions for configuration files (#440) * Add tip on extensions for configuration files Resolves #423 * fix numbering Co-authored-by: Matt Wojciakowski <[email protected]> * Corrected path (#434) The LocalAppData path was missing `{app-name}` * Update panes.md (#432) Minor edit on a shortcut key * Correct $PROFILE configuration (#431) When using winget, Oh-my-posh will not add Set-PoshPrompt to path, the execution will fail. The correct configuration can be found in https://ohmyposh.dev/docs/windows#replace-your-existing-prompt * Add a sample page (#444) * Add FAQ page (#442) * Add FAQ page * Finalize faq v1 * Replace md with yml, add toc * Update with settings UI feedback from kayla * fix image link * Fix preview faq Co-authored-by: Kayla Cinnamon <[email protected]> Co-authored-by: Floris Westerman <[email protected]> Co-authored-by: Mike Griese <[email protected]> Co-authored-by: Schuyler Rosefield <[email protected]> Co-authored-by: Sean Jacobs <[email protected]> Co-authored-by: Leon Liang <[email protected]> Co-authored-by: Carlos Zamora <[email protected]> Co-authored-by: Pankaj Bhojwani <[email protected]> Co-authored-by: PankajBhojwani <[email protected]> Co-authored-by: Nivaldo Tokuda <[email protected]> Co-authored-by: David A. Sjøen <[email protected]> Co-authored-by: tharindu sathischandra <[email protected]> Co-authored-by: Cutano <[email protected]> * Toc update (#457) * Update to change equal symbol to plus key Addresses issue #196 *On my Surface Book keyboard + and = are the same key, but this may not be the case for all keyboard layouts. * change + to plus as shipped by default * Add notes about title change persistance * Update settings.json section * Link settings.json mentions * Fix links * fix a few more links * Update TerminalDocs/customize-settings/actions.md Co-authored-by: Kayla Cinnamon <[email protected]> * Update TerminalDocs/dynamic-profiles.md Co-authored-by: Kayla Cinnamon <[email protected]> * Update TerminalDocs/customize-settings/actions.md Co-authored-by: Kayla Cinnamon <[email protected]> * Remove repititious section * Added browser media keys (#371) * Add link to what is command line shell video (#377) * add intenseTextStyle to the docs (#381) * Multiple new pane features (#383) Documentation for - microsoft/terminal#10713 - microsoft/terminal#10638 - microsoft/terminal#10780 - microsoft/terminal#10927 * wt.exe --window argument now available (#388) * Add notes that the `font` object is only 1.10+ (#389) Co-authored-by: Kayla Cinnamon <[email protected]> * Remove MinimizeToTray action mentions (#387) * Docs updates for 1.11 release (#397) * Specify OS version availability for defterm (#417) Co-authored-by: Kayla Cinnamon <[email protected]> * Remove tilde Reshttps://github.com/MicrosoftDocs/terminal/issues/260olves * Improve dup tab description #292 * Update minimizetotray setting to new name * Merge release 1.12 into master (#428) Co-authored-by: Kayla Cinnamon <[email protected]> Co-authored-by: Pankaj Bhojwani <[email protected]> Co-authored-by: Matt Wojciakowski <[email protected]> Co-authored-by: Mike Griese <[email protected]> Co-authored-by: Carlos Zamora <[email protected]> Co-authored-by: Schuyler Rosefield <[email protected]> Co-authored-by: PankajBhojwani <[email protected]> * Remove preview labels * Add redirect for old powerline page * Add vscode to gitignore * Config changes to reflect the default branch from master to main. * Add a note about the command palette to this doc (#447) * Add details about the command used to print the table (#446) * initialPos -> initialPosition (#445) * Add tip on extensions for configuration files (#440) * Add tip on extensions for configuration files Resolves #423 * fix numbering Co-authored-by: Matt Wojciakowski <[email protected]> * Corrected path (#434) The LocalAppData path was missing `{app-name}` * Update panes.md (#432) Minor edit on a shortcut key * Correct $PROFILE configuration (#431) When using winget, Oh-my-posh will not add Set-PoshPrompt to path, the execution will fail. The correct configuration can be found in https://ohmyposh.dev/docs/windows#replace-your-existing-prompt * Add a sample page (#444) * Add FAQ page (#442) * Add FAQ page * Finalize faq v1 * Replace md with yml, add toc * Update with settings UI feedback from kayla * fix image link * Fix preview faq * Add a guide for using OSC9;9 (#449) * I think this is everything we need. Pushing because I don't know if the image paths are right * This should fix the warnings * maybe fix the urls? * typos * Update TerminalDocs/tutorials/new-tab-same-directory.md Co-authored-by: Felix Christl <[email protected]> Co-authored-by: Matt Wojciakowski <[email protected]> Co-authored-by: Felix Christl <[email protected]> * Minor quake mode text update (#454) * DocuTune: Fix ms.topic values (#453) Co-authored-by: Kayla Cinnamon <[email protected]> Co-authored-by: Floris Westerman <[email protected]> Co-authored-by: Mike Griese <[email protected]> Co-authored-by: Schuyler Rosefield <[email protected]> Co-authored-by: Sean Jacobs <[email protected]> Co-authored-by: Leon Liang <[email protected]> Co-authored-by: Carlos Zamora <[email protected]> Co-authored-by: Pankaj Bhojwani <[email protected]> Co-authored-by: PankajBhojwani <[email protected]> Co-authored-by: Nivaldo Tokuda <[email protected]> Co-authored-by: David A. Sjøen <[email protected]> Co-authored-by: tharindu sathischandra <[email protected]> Co-authored-by: Cutano <[email protected]> Co-authored-by: Felix Christl <[email protected]> Co-authored-by: Alex Buck <[email protected]> Co-authored-by: Kayla Cinnamon <[email protected]> Co-authored-by: Floris Westerman <[email protected]> Co-authored-by: Mike Griese <[email protected]> Co-authored-by: Schuyler Rosefield <[email protected]> Co-authored-by: Sean Jacobs <[email protected]> Co-authored-by: Leon Liang <[email protected]> Co-authored-by: Carlos Zamora <[email protected]> Co-authored-by: Pankaj Bhojwani <[email protected]> Co-authored-by: PankajBhojwani <[email protected]> Co-authored-by: Nivaldo Tokuda <[email protected]> Co-authored-by: David A. Sjøen <[email protected]> Co-authored-by: tharindu sathischandra <[email protected]> Co-authored-by: Cutano <[email protected]> Co-authored-by: Felix Christl <[email protected]> Co-authored-by: Alex Buck <[email protected]>
Summary of the Pull Request
Add functionality to move a pane to another tab. If the tab index is greater than the number of current tabs a new tab will be created with the pane as its root. Similarly, if the last pane on a tab is moved to another tab, the original tab will be closed.
This is largely complete, but I know that I'm messing around with things that I am unfamiliar with, and would like to avoid footguns where possible.
References
#4587
PR Checklist
Detailed Description of the Pull Request / Additional comments
Things done:
Detached
event on a pane that can be subscribed to to remove other event handlers if desired.To do:
TerminalTab
as a friend class ofPane
so I can access some extra properties in myWalkTree
callbacks, but there is probably a better choice for the abstraction boundary.Next Steps:
Validation Steps Performed
Manual testing by creating pane(s), and moving them between tabs and creating new tabs and destroying tabs by moving the last remaining pane.