## Summary
Always focus the MRU (most recently used) tab when closing the current
tab, regardless of TabSwitcherMode setting.
## References
Fixes#19819
## Detailed Description
Removed the `TabSwitcherMode` check in `_RemoveTab` (TabManagement.cpp)
so tab-close focus behavior is always MRU-based, decoupling it from the
tab switcher preference as noted by @DHowett.
## Validation Steps
- Opened 3 tabs, navigated Tab3 → Tab1, closed Tab1
- With fix: Tab3 focused (MRU)
- Without fix: Tab2 focused (next in order)
## PR Checklist
Closes#19819
## Summary of the Pull Request
Fixes a denial of service by a toddler with an Xbox controller wanting
to play Forza. They can impatiently press up and down and close out the
terminal window.
Issue is upstream in WinUI, but I think this gathers things into a state
where Terminal can at least recover by adding a `GettingFocus` handler
on the `TabViewItem` that cancels that gamepad focus move before it
reaches the framework handler.
## References and Relevant Issues
Issue #19671 and #20089
## Validation Steps Performed
Handed a controller to my toddler while working in terminal. I also
banged on the keys myself.
## PR Checklist
Closes#19671Closes#20089
The nvidia driver attempts to use SHGetKnownFolder (which has its own
lock!) under the loader lock, which occasionally triggers a deadlock
when we attempt to do the same thing during settings load.
Closes#20350 (superseded)
Closes#20348
Co-authored-by: gleb <46842077+groovg@users.noreply.github.com>
## Summary
Fixes a crash in the Settings UI font face control when selecting a font
suggestion with the keyboard and pressing Enter.
The font face `AutoSuggestBox` path was explicitly unfocusing the box
after a chosen suggestion was submitted. During the keyboard suggestion
commit path, that `Focus(FocusState::Unfocused)` call can trigger a
WinUI/XAML crash before the settings model update completes.
This change avoids explicitly unfocusing the `AutoSuggestBox` in the
chosen-suggestion path and instead commits the selected font and moves
focus to the parent container.
Fixes#20245.
## Validation
Manually validated with a local `CascadiaPackage` Debug x64 build:
- Reproduced the crash before the fix.
- Opened Settings → Defaults → Appearance → Font face.
- Typed a partial font name.
- Used arrow keys to select a suggestion.
- Pressed Enter.
- Verified Terminal no longer crashes.
- Verified the selected font is applied and Save works.
This adds a new feature to the Windows Terminal: "Workspaces"
Workspaces are very shamelessly inspired by Edge workspaces of the same
name.
The core idea is that when users name a window and they close that
window, we will persist that Windows layout and buffers, seperately from
the rest of window restoration. So a user can open a named window, open
some profiles, some panes, do some stuff in it, then close it, and we
will keep that state around for the next time the user opens that window
name.
Unnamed windows still behave the same. If you close an unnamed window,
and it's not the last window, then we won't persist the state of it.
To facilitate restoring named windows, we add a `openWorkspace` action.
This allows us to persist the open workspace action in the window layout
restoration path. So when we deserialize the list of tab layouts, and
open workspace action will tell us, hey, go retrieve this known
workspace from the state.json, instead of trying to serialize the window
state in two places.
As demoed in the video, we add a flyout to list the windows that the
user has open, and the named workspaces that they have saved. This
allows users to quickly reopen previously closed workspaces, as well as
quickly rename a window, thereby adding it to the list of saved
workspaces. This button can also be hidden using the theme settings.
Closes#17084
(this is a reboot of #20162, but with the event from #20311)
This is a pair of changes to make the code formatting scripts work,
circa 2026.
* If you only have VS Insiders installed, then vswhere can't actually
find a clang-format to build with. You need `-prerelease` to let it also
find preview builds of VS.
* Years ago we updated OpenConsole.psm1 to only support pwsh 7. I, of
course, use `cmd` as my dev env for terminal, so I use `runformat.cmd`,
which always shelled to `powershell` (5). This updates that tool to use
pwsh 7. Clearly this impacted only me ever.
related to #20162
From ye old days where we were a multi-process app, we would
`shellexecute` to create a new Terminal process when we wanted to open a
new window.
Now that we're all one process (#18215), this dance doesn't make sense
anymore.
So: let's just add a bunch of plumbing to take the IContentArgs up to
the emperor and have it hand them back to a new window.
(this will be used to resurrect #20162)
This adds a new feature to the Windows Terminal: "Workspaces"
Workspaces are very shamelessly inspired by Edge workspaces of the same
name.
The core idea is that when users name a window and they close that
window, we will persist that Windows layout and buffers, seperately from
the rest of window restoration. So a user can open a named window, open
some profiles, some panes, do some stuff in it, then close it, and we
will keep that state around for the next time the user opens that window
name.
Unnamed windows still behave the same. If you close an unnamed window,
and it's not the last window, then we won't persist the state of it.
To facilitate restoring named windows, we add a `openWorkspace` action.
This allows us to persist the open workspace action in the window layout
restoration path. So when we deserialize the list of tab layouts, and
open workspace action will tell us, hey, go retrieve this known
workspace from the state.json, instead of trying to serialize the window
state in two places.
As demoed in the video, we add a flyout to list the windows that the
user has open, and the named workspaces that they have saved. This
allows users to quickly reopen previously closed workspaces, as well as
quickly rename a window, thereby adding it to the list of saved
workspaces. This button can also be hidden using the theme settings.
Closes#17084
## Summary of the Pull Request
Fix DevOps capitalization in README.
## Detailed Description of the Pull Request / Additional comments
Updated "Devops" to "DevOps" in README for consistent capitalization.
## Validation Steps Performed
* Checked README formatting
* Verified markdown renders correctly
## Summary of the Pull Request
targets #20010
This adds support for the `OSC 777 ; notify ; title ; body ST` sequence.
This allows client applications to send a notification to the Terminal.
When this notification is clicked, it summons the terminal window that
sent it.
## Validation Steps Performed
```pwsh
# in PowerShell. Terminal should not be focused.
sleep 2; Write-Output "`e]777;notify;Hello;This is a notification`a"
```
## PR Checklist
- [X] Closes#7718
- [ ] Documentation updated
- [X] Schema updated (if necessary)
Heavily based on #19938
Co-authored by @zadjii-msft
## Summary of the Pull Request
Adds a manual event handler for `PaneOpened`/`PaneClosed` on the
navigation view in the settings UI. After catching the event, we raise a
UIA notification event to force the attached screen reader to read out
"Navigation pane opened/closed" appropriately. This experience aligns
with WinUI and the text is localized appropriately.
## Validation Steps Performed
✅ Narrator announces "Navigation pane opened/closed" appropriately
(aligns with WinUI 3 gallery experience)
## PR Checklist
Closes#19687📝 NOTE: the associated issue is currently affecting our accessibility
score
Currently when you use the cmdpal in tabswitcher mode, we "preview"
switching to that tab. We don't do that for `tabSearch` mode though.
Fixing that was half a line of code. Now we do.
Closes#20233
## Summary of the Pull Request
Renames the "New tab menu" page to "Dropdown menu".
Redesigns the page with the following notes:
- the preview is now on the right side so that it's always visible
- moves preview buttons into border with previewed new tab menu entries
- when the window narrows, removes the icons from the controls, then
changes layout to be vertical so that it all fits.
Aside from the main redesign changes above, a lot of the other changes
are to make sure that spacing and alignment looks ok.
## Validation Steps Performed
- [x] Wide view
- [x] Medium width view
- [x] Narrow view
## PR Checklist
Related to #17000
This is a trivial fix for an issue we get a somewhat outsized number of
complaints about.
When the user has adjusted the font size in any direction, we'll just
keep track of the magnitude and apply it every time the settings change.
Yes, this means that if you zoom once and then change your real font
size it's going to zoom even more.
That probably doesn't matter.
Refs #11522
We believed that this would fix an issue on Windows 10, where the volume
mixer would forget Windows Terminal after every relaunch. It turns out
that it does not.
Still, this code is much more concise and doesn't require yet another
WinRT object. Story of our lives.
Refs #17733
There is some disagreement among terminal emulators as to whether DECSTR
(and therefore, soft reset) restores the cursor in the active buffer or
in all buffers.
We had previously chosen to restore the cursor in all buffers.
xterm restores the cursor only in the active buffer.
Closes#19918
This adds a `safeUriSchemes` global setting which lets you define
hyperlink URI schemes which the user considers safe. No confirmation
dialog will be shown when trying to open hyperlinks which use these
schemes.
- This solves the root issue, but doesn't introduce any UI or
documentation changes. I wanted to validate the approach and
implementation with you first.
- I closely followed the code handling the `disabledProfileSources`
setting, which is of the same type.
- This feature does not change the behavior of `http`, `https` and
`file` schemes.
Validation
I ran the dev terminal, and tested the behavior by clicking on `vscode`
hyperlinks generated by ripgrep with various `safeUriSchemes` settings:
- Setting not defined - asks for confirmation
- `["vscode"]` - does not ask for confirmation
- `["foo", "vscode"]` - does not ask for confirmation
- `["foo"]` - asks for confirmation
- `null` - asks for confirmation
- `[]` - asks for confirmation
- `[""]` - asks for confirmation
- `[{"foo": "bar"}]` - fails to deserialize (as expected)
A few uinit tests failed, but they seem unrelated to these changes:
- `KeyBindingTests` in `UnitTests_SettingsModel`, probably because I use
an AZERTY keyboard.
- A few `Conhost` tests, but I didn't touch this part
Refs #20065Closes#20191