-
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
Teach Terminal to move tabs with key bindings #8338
Conversation
@zadjii-msft - please review. I still need to add some tests. At least for parameters parsing. |
This comment has been minimized.
This comment has been minimized.
1 similar comment
This comment has been minimized.
This comment has been minimized.
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.
Overall, I'm definitely cool with this, just want an answer on the MRU thing before I hit the ✔️
@zadjii-msft - may I ask a question about the process? Dometimes when you approve PR you add more reviewers, and sometimes not. Is it related to the fact that you wan to dogfood first - or any other considerations. Feel free to ignore if this is not for public messaging. |
I'm gonna level with you - there's not usually a rhyme or reason to it. Sometimes I remember the "Needs-Second" label, and other times I don't. Sometimes I'll assign someone if they're a particular expert in the feature area, but with all the command palette work you've been doing, I am usually the feature area expert 😄 |
@DHowett - bumping this for the case you want to give me a homework for the long week-end 😊 |
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.
minor nits and Qs, but I'm obligated to block until we have a documentation PR in hand 😄
// - <none> | ||
void TerminalPage::_TryMoveTab(const uint32_t currentTabIndex, const int32_t suggestedNewTabIndex) | ||
{ | ||
uint32_t newTabIndex = std::clamp<int32_t>(suggestedNewTabIndex, 0, _tabs.Size() - 1); |
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.
qq: should tab move wrap around like tab switch? moving to the right when you're at the end might want to move to the far left?
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.
Sincerely speaking I am not sure what will be more useful, thought this will be more aligned with what we have when dragging with a mouse.
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.
Beautiful, as always. Thank you!
Hello @DHowett! Because this pull request has the p.s. you can customize the way I help with merging this pull request, such as holding this pull request until a specific person approves. Simply @mention me (
|
Thank you thank you thank you for adding this!! When running Terminal as administrator (which I always have to do) there has been no way to re-order tabs until now. Sooo glad to see this alternate method that works when elevated! |
Summary of the Pull Request
Introduces a new command called
moveTab
This command has a single mandatory argument with values of
forward
andbackward
PR Checklist
Detailed Description of the Pull Request / Additional comments
Went for the straightforward solution of moving the tab and the tabViewItem.
Validation Steps Performed