[PR #9162] [MERGED] Teach tab to focus terminal after rename #27453

Open
opened 2026-01-31 09:22:04 +00:00 by claunia · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/microsoft/terminal/pull/9162
Author: @Don-Vito
Created: 2/14/2021
Status: ✅ Merged
Merged: 2/17/2021
Merged by: @undefined

Base: main ← Head: 9160-focus-tab-after-rename


📝 Commits (3)

  • d885135 Teach tab to focus terminal after rename
  • 3f76f1c Prevent focusing on terminal if flyout is open
  • 462bae4 Employ TabBase::Focus to address SUI tab focus

📊 Changes

5 files changed (+23 additions, -2 deletions)

View changed files

📝 src/cascadia/TerminalApp/TabHeaderControl.cpp (+6 -2)
📝 src/cascadia/TerminalApp/TabHeaderControl.h (+2 -0)
📝 src/cascadia/TerminalApp/TabHeaderControl.idl (+1 -0)
📝 src/cascadia/TerminalApp/TerminalPage.cpp (+13 -0)
📝 src/cascadia/TerminalApp/TerminalTab.h (+1 -0)

📄 Description

Summary of the Pull Request

After rename ends (either by enter or escape) the rename box
gets collapsed and the focus moves to the next tab stop
in the TabView (e.g., new tab button).

To overcome this:

  • Added RenameEnded event to TabHeaderControl
  • Forwarded it as RenamerDeactivated from TerminalTab
  • Registered in the TerminalPage to focus the active control upon
    RenamerDeactivated if focus didn't move to tab menu.

This means, no matter how you close the renamer,
the current terminal gains the focus.

PR Checklist


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/microsoft/terminal/pull/9162 **Author:** [@Don-Vito](https://github.com/Don-Vito) **Created:** 2/14/2021 **Status:** ✅ Merged **Merged:** 2/17/2021 **Merged by:** [@undefined](undefined) **Base:** `main` ← **Head:** `9160-focus-tab-after-rename` --- ### 📝 Commits (3) - [`d885135`](https://github.com/microsoft/terminal/commit/d88513520f7e7d817504e1e6464b19d83b8a88ef) Teach tab to focus terminal after rename - [`3f76f1c`](https://github.com/microsoft/terminal/commit/3f76f1c6c0d78da599202bab49d8006562e3ef4b) Prevent focusing on terminal if flyout is open - [`462bae4`](https://github.com/microsoft/terminal/commit/462bae4a2f5530d2e83e388b3954b41de7267bda) Employ TabBase::Focus to address SUI tab focus ### 📊 Changes **5 files changed** (+23 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `src/cascadia/TerminalApp/TabHeaderControl.cpp` (+6 -2) 📝 `src/cascadia/TerminalApp/TabHeaderControl.h` (+2 -0) 📝 `src/cascadia/TerminalApp/TabHeaderControl.idl` (+1 -0) 📝 `src/cascadia/TerminalApp/TerminalPage.cpp` (+13 -0) 📝 `src/cascadia/TerminalApp/TerminalTab.h` (+1 -0) </details> ### 📄 Description ## Summary of the Pull Request After rename ends (either by enter or escape) the rename box gets collapsed and the focus moves to the next tab stop in the TabView (e.g., new tab button). To overcome this: * Added RenameEnded event to TabHeaderControl * Forwarded it as RenamerDeactivated from TerminalTab * Registered in the TerminalPage to focus the active control upon RenamerDeactivated if focus didn't move to tab menu. This means, no matter how you close the renamer, the current terminal gains the focus. ## PR Checklist * [x] Closes https://github.com/microsoft/terminal/issues/9160 * [x] CLA signed. * [ ] Tests added/passed * [ ] Documentation updated. * [ ] Schema updated. * [ ] I've discussed this with core contributors already. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
claunia added the pull-request label 2026-01-31 09:22:04 +00:00
Sign in to join this conversation.
No Label pull-request
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#27453