Skip to content
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

Only attempt to focus if there is a control to focus #11040

Merged
1 commit merged into from
Aug 25, 2021

Conversation

Rosefield
Copy link
Contributor

@Rosefield Rosefield commented Aug 25, 2021

Only focus if there is a control to focus (which may be null if e.g. the focused tab is being destroyed)

Closes #11037

Additional comments

I tried to remove the _activePane = nullptr in TerminalTab::DetachPane but that actually completely broke being able to focus the control at all making the tab completely unusable. Focus does seem to transfer just fine here with this change.

Validation Steps Performed

Used the command execution to move panes to and from existing panes, including new tabs and destroying tabs.

@ghost ghost added Area-User Interface Issues pertaining to the user interface of the Console or Terminal Issue-Bug It either shouldn't be doing this or needs an investigation. Priority-1 A description (P1) Product-Terminal The new Windows Terminal. Severity-Blocking We won't ship a release like this! No-siree. labels Aug 25, 2021
@Rosefield
Copy link
Contributor Author

@zadjii-msft I know you assigned it to yourself, but I'm sure you're busy being a team lead instead of dealing with my bugs.

Copy link
Member

@DHowett DHowett left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a nice targeted solution. I somewhat wish we didn't have to check for an active control everywhere, but we'll almost certainly refactor before too long.

Thank you!

@DHowett
Copy link
Member

DHowett commented Aug 25, 2021

@msftbot merge this in 7 minutes and make sure @zadjii-msft signs off

@ghost ghost added the AutoMerge Marked for automatic merge by the bot when requirements are met label Aug 25, 2021
@ghost
Copy link

ghost commented Aug 25, 2021

Hello @DHowett!

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:

  • I'll only merge this pull request if it's approved by @zadjii-msft

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".

Copy link
Member

@zadjii-msft zadjii-msft left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lol I actually have this in the branch I'm working on today too 😋

@DHowett
Copy link
Member

DHowett commented Aug 25, 2021

@msftbot merge this in 1 minute

@ghost
Copy link

ghost commented Aug 25, 2021

Hello @DHowett!

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:

  • I'll only merge this pull request if it's approved by @zadjii-msft
  • I won't merge this pull request until after the UTC date Wed, 25 Aug 2021 21:49:46 GMT, which is in 1 minute

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".

@ghost ghost merged commit ee8800c into microsoft:main Aug 25, 2021
@Rosefield Rosefield deleted the bug/gh11037-mp-crash branch August 25, 2021 22:09
DHowett pushed a commit that referenced this pull request Aug 25, 2021
Only focus if there is a control to focus (which may be null if e.g. the focused tab is being destroyed)

Closes #11037 

## Additional comments
I tried to remove the _activePane = nullptr in `TerminalTab::DetachPane` but that actually completely broke being able to focus the control at all making the tab completely unusable. Focus does seem to transfer just fine here with this change.

## Validation Steps Performed
Used the command execution to move panes to and from existing panes, including new tabs and destroying tabs.
@ghost
Copy link

ghost commented Aug 31, 2021

🎉Windows Terminal Preview v1.10.2383.0 has been released which incorporates this pull request.:tada:

Handy links:

@ghost
Copy link

ghost commented Aug 31, 2021

🎉Windows Terminal Preview v1.11.2421.0 has been released which incorporates this pull request.:tada:

Handy links:

This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-User Interface Issues pertaining to the user interface of the Console or Terminal AutoMerge Marked for automatic merge by the bot when requirements are met Issue-Bug It either shouldn't be doing this or needs an investigation. Priority-1 A description (P1) Product-Terminal The new Windows Terminal. Severity-Blocking We won't ship a release like this! No-siree.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

move-pane -t (existing tab) now crashes
3 participants