terminal/.github/actions/spelling
Leonard Hecker 35ce8cc858
Fix default terminal setting dropdown (#11430)
WinUI/XAML requires the `SelectedItem` to be member of the list of
`ItemsSource`. `CascadiaSettings::DefaultTerminals()` is such an `ItemsSource`
and is called every time the launch settings page is visited.
It calls `DefaultTerminal::Available()` which in turn calls `Refresh()`.
While the `SelectedItem` was cached in `CascadiaSettings`, the value of
`DefaultTerminals()` wasn't. Thus every time the page was visited, it refreshed
the `ItemsSource` list without invalidating the current `SelectedItem`.

This commit prevents such accidental mishaps from occurring in the future,
by moving the responsibility of caching solely to the `CascadiaSettings` class.

## PR Checklist
* [x] Closes #11424
* [x] I work here
* [x] Tests added/passed

## Validation Steps Performed
* Navigating between SUI pages maintains the current dropdown selection ✔️
* Saving the settings saves the correct terminal at `HKCU:\Console\%%Startup` ✔️
2021-10-06 16:58:09 +00:00
..
allow Show only latest VS, VC prompts by default (#11326) 2021-09-29 22:03:05 +00:00
expect Fix default terminal setting dropdown (#11430) 2021-10-06 16:58:09 +00:00
patterns Show only latest VS, VC prompts by default (#11326) 2021-09-29 22:03:05 +00:00
advice.md ci: spelling: update to v0.0.18 (#10035) 2021-05-14 08:28:37 -05:00
excludes.txt ci: spelling: update to v0.0.18 (#10035) 2021-05-14 08:28:37 -05:00
reject.txt ci: spelling: update to v0.0.18 (#10035) 2021-05-14 08:28:37 -05:00