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

Remaining tabs are not resized when closing tabs with keyboard #4971

Closed
zadjii-msft opened this issue May 6, 2021 · 4 comments · Fixed by #4980
Closed

Remaining tabs are not resized when closing tabs with keyboard #4971

zadjii-msft opened this issue May 6, 2021 · 4 comments · Fixed by #4980

Comments

@zadjii-msft
Copy link
Member

Describe the bug

(Moved from microsoft/terminal#9822)

Steps to reproduce the bug

  1. Open a bunch of tabs,
  2. Close all but a few with the keyboard.

(You can close tabs in the XCG with ctrl+f4

Expected behavior

I expect tabs to be restored to their original size when the space allows for it.

Actual Behavior

Tabs remain compacted indefinitely. The only way to get the tabs back to their expected size seems to be to grab the mouse and hover over the tab bar and then move the mouse off the tab bar again.

Version Info

Windows Terminal version 1.8.1032.0

NuGet package version: [Microsoft.UI.Xaml.2.5.0-prerelease.201202003]

@ghost ghost added the needs-triage Issue needs to be triaged by the area owners label May 6, 2021
@marcelwgn
Copy link
Collaborator

I think the issue is in the folllowing line:

UpdateTabWidths(false);

If you remove the false from that line, it should update correctly. @zadjii-msft Would you maybe like to create a PR for this?

@zadjii-msft
Copy link
Member Author

Unfortunately I don't think I've got enough disk space left to make a fresh clone of the WinUI repo and get it built 🙃 That looks right to me, from my totally 0 experience with the WinUI codebase. Presumably, that path isn't hit when closing via the close tab button, right? I'd want to make sure we don't accidentally regress #2569

@marcelwgn
Copy link
Collaborator

Fair enough, I would create a PR then if you don't mind :)
Good that you mentioned #2569, I think the function I mentioned will only be called when hitting Ctrl+F4, but I will double check that to be sure.

@DavidZidar
Copy link

Tabs need to be resized in other cases too (not just Ctrl+F4) like when exiting a shell in Windows Terminal.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants