4656 Commits

Author SHA1 Message Date
Leonard Hecker
dfcc8f3c62
Fix use-after-free when disabling the ASB (#19186)
Closes #17515

## Validation Steps Performed
* Disable the ASB while there's a pending cooked read
* Type some text
* No crash 
2025-07-29 13:48:33 -05:00
Quaylyn Rimer
e818dafa6d
Fix scrollbar marks not appearing until scroll or resize (#19185)
This PR resolves an issue where scrollbar marks created by shell
integration sequences (OSC 133 FTCS, OSC 1337 iTerm2, and OSC 9;12
ConEmu sequences) were not visible on the scrollbar until the user
manually scrolled.

The problem was that while marks were being created in the buffer
correctly, the UI wasn't being notified to refresh the scrollbar
display. The fix adds a new NotifyShellIntegrationMark() method to the
ITerminalApi interface that calls _NotifyScrollEvent() to trigger
scrollbar refresh, and updates all shell integration sequence handlers
in AdaptDispatch to call this notification method after creating marks.
This ensures scrollbar marks appear immediately when shell integration
sequences are processed, bringing feature parity between auto-detected
and shell-integration-based marks.

Closes #19104
2025-07-29 12:20:47 -05:00
Leonard Hecker
0c3002c1b9
Remove ColorHelper (#19187)
Most of `ColorHelper` was unused and one of them had UB.

Related to #19183

## Validation Steps Performed
* Set a custom tabRow theme color
  Split button looks similar to before 
* White/black FG color decision for colored
  tabs is similar to before 
2025-07-29 11:35:48 -05:00
Weichen Li
7d6e0c8b8e
Fix WSLENV environment variable duplication in ConptyConnection (#19167)
This PR fixes issue #7130 where WT_SESSION and WT_PROFILE_ID environment
variables were being duplicated in the WSLENV environment variable when
multiple terminal sessions were created.

The previous implementation always appended WT_SESSION:WT_PROFILE_ID: to
WSLENV without checking if these variables already existed, causing
duplication.

Closes #7130

Co-authored-by: Leonard Hecker <lhecker@microsoft.com>
2025-07-29 01:47:06 +00:00
Dustin L. Howett
65788d9099
Filter Command Palette in English in addition to local language (#19166)
The bulk of this work is changing `Command::Name` (and its descendants
like `GenerateName`) to support looking up names in English and in the
local language.

When matching a "palette item" with a "subtitle" (a new field introduced
to store the English command name when the current language is not
English), the weight of the subtitle is used only if it is greater than
the weight of the name. This ensures that we do not penalize or
over-promote results that contain similar Latin letters in both fields.

Refs #19130, #19131, #19132, #19165
Closes #7039
2025-07-28 19:08:48 +00:00
Windows Console Service Bot
671440206c
Localization Updates - main - 07/25/2025 16:15:20 (#19174)
scroll to zoom + scroll to do opacity
2025-07-25 16:52:27 +00:00
Dustin L. Howett
482980c336
Command: realize resource-key names when they are requested, not at load (#19165)
Right now, when a Command's name is `{"key": "ResourceName"}` we resolve
the resource immediately at load time. That prevents us from looking it
up later in another language if we need to.

This pull request introduces an intermediate representation for command
names which is be resolved during `Command::Name`.

Refs #7039
2025-07-24 12:53:09 -05:00
Carlos Zamora
7ab5978b58
Partially revert the key chord styling in actions page (#19164)
Reverts most of the styling changes done in #19001 to the key chords
displayed in the SUI's Actions page. The `CornerRadius` was kept at the
updated value of `ControlCornerRadius` for consistency.

The only other changes in #19001 that were kept for this page include:
- `EditButtonIconSize`: 15 --> 14
- `AccentEditButtonStyle` > `Padding`: 3 --> 4
- Command name's `FontWeight` reduced to `Normal`
- `AddNewButton` > `Margin` added (set to `0,12,0,0` to provide spacing
between breadcrumb header and button)
2025-07-23 18:21:23 -05:00
Niels Laute
48b796f102
[UX] Settings UI refinements (#19001)
This PR is a (first) design pass on the Terminal settings UX to bring
consistency and alignment with the rest of the OS and other settings
surfaces.

High-level changes include:
- Using WinUI brushes vs. UWP/OS brushes. [See brushes overview in the
WinUI 3 Gallery:](winui3gallery://item/Color).
- Updating pixel values for margins, fontsizes, paddings etc. using
units of 4. See [the design guidelines for more
info](https://learn.microsoft.com/en-us/windows/apps/design/basics/content-basics).
- Adding rounded corners on various elements to be consistent with the
Windows 11 look and feel (using the ControlCornerRadius or
OverlayCornerRadius WinUI resources as much as possible).
- Decreasing the page header titles / breadcrumb so it feels a bit less
cramped.
- Fixing a bug where the title of the page was not aligned with the
content when resizing the window (note to self: should fix this in
PowerToys too):
- Ensuring the subheader texts for settings categories are inline with
the rest of the OS (== decreasing the fontsize).

---------

Co-authored-by: Carlos Zamora <carlos.zamora@microsoft.com>
2025-07-23 10:07:11 -07:00
Dustin L. Howett
f22295ef2c
Merge TabBase+TerminalTab into just Tab (#19136)
This removes the need to construct two objects per tab (TabBase, Actual
Tab) and the other overhead inherent in WinRT composition-based
inheritance.

Important renames:

- `GetTerminalTabImpl` -> `GetTabImpl`

This pull request does not rename `TerminalTabStatus`; that is left as
work for a future PR.

Closes #17529
2025-07-22 08:04:19 -07:00
HO-COOH
cb0289fff2
Center text in the Default Terminal dropdown (#19072)
This is a small UI fix so that we center the default terminal application ComboBox text.
2025-07-21 17:35:09 -05:00
Carlos Zamora
8c20d2052d
Add telemetry for new tab menu traffic (#19142)
## Summary of the Pull Request
Adds new telemetry events to track traffic through the new tab menu.
Specifically, the following events are added:
- `NewTabMenuDefaultButtonClicked`: Event emitted when the default
button from the new tab split button is invoked
- `NewTabMenuOpened`: Event emitted when the new tab menu is opened
- `NewTabMenuClosed`: Event emitted when the new tab menu is closed
- `NewTabMenuItemClicked`: Event emitted when an item from the new tab
menu is invoked
- Has an `ItemType` parameter that can be set to `Settings`,
`CommandPalette`, `About, `Profile`, `Action`
- Has a `TabCount` parameter that keeps tracked of the number of tabs in
the window before changing the state
- `NewTabMenuCreatedNewTerminalSession`: Event emitted when a new
terminal was created via the new tab menu
- Has a `SessionType` parameter that can be set to `ElevatedWindow`,
`Window`, `Pane`, `Tab`
- Instead of `TabCount`, has a `NewTabCount` that keeps track of the
_new_ number of tabs after the session has been created
- `NewTabMenuItemElevateSubmenuItemClicked`: Event emitted when the
elevate submenu item from the new tab menu is invoked

## Validation Steps Performed
Used TVPP to see events generated from interacting with the new tab
menu.
2025-07-21 15:33:52 -07:00
Paulina Kalicka
452fa87937
feat: add option to adjust opacity with Ctrl+Shift+scroll (#19151)
## Summary of the Pull Request
This PR introduces an experimental setting that allows to toggle opacity
changes with scrolling.

## References and Relevant Issues
#3793

## Detailed Description of the Pull Request / Additional comments
By default, holding Ctrl + Shift while scrolling changes the terminal's
opacity. This PR adds an option to disable that behavior.

## Validation Steps Performed
I built the project locally and verified that the new feature works as
intended.

## PR Checklist
- [x] Resolves
https://github.com/microsoft/terminal/issues/3793#issuecomment-3085684640
- [x] Tests ~~added/~~ passed
- [x] Documentation updated
- If checked, please file a pull request on [our docs
repo](https://github.com/MicrosoftDocs/terminal) and link it here:
https://github.com/MicrosoftDocs/terminal/pull/873
- [X] Schema updated (if necessary)
2025-07-21 15:24:46 -07:00
Dustin L. Howett
3979e82c2b
Remove IconElement caching from PaletteItem (#19149)
In #19132, we introduced caching for BasePaletteItem::ResolvedIcon as a
late optimization.

We actually can't cache those, because they're UI elements, with parents
and relationships and all. When you filter a list with icons and the
list elements change physical position, they're assigned new templates--
and new parents.

Fixes e7939bb4e

Co-authored-by: Eric Nelson <e82.eric@gmail.com>
2025-07-21 15:11:26 -07:00
Dustin L. Howett
fedf7b3b6c
Undo the damage done to FilteredCommand in #17330 (#19148)
PR #17330 changed FilteredCommand so that FilteredTask could derive from
it. It also **did not** implement FilteredTask as a derived class.

We've been carrying around the debt of a decision we un-decided for like
a year.
2025-07-18 17:09:12 -07:00
Paulina Kalicka
a04e410a39
feat: add option to enable zoom with ctrl + scroll (#19127)
This PR adds a new global setting `scrollToZoom` that allows users to
enable font zooming with scrolling. When disabled, **this setting
prevents accidental font size changes** that can occur when users scroll
while holding the Ctrl key.

Note: after disabling this setting, users may still change font size
using `Ctrl+` and `Ctrl-` keyboard shortcuts. Other Ctrl+Scroll
functionality (like transparency adjustments) remains unaffected.

## Validation Steps Performed

- Verified the setting can be toggled in the Settings UI (Interaction
tab)
- Confirmed that when disabled, holding Ctrl and scrolling no longer
changes font size
- Validated that the setting persists across terminal restarts

---

Note: I used the existing `FocusFollowMouse` setting as a reference for
implementing this.

Closes #11710
Closes #3793
Closes #11906
Closes #3990
2025-07-17 22:09:52 +00:00
Dustin L. Howett
7b841628df
Re-enable web-source icons in Stable and Preview builds (#19137)
Disables a controversial part of #19044.

Refs #19075
2025-07-17 02:13:12 +00:00
Dustin L. Howett
5b63e24c73
ci: turn on SARIF reporting unconditionally for check-spelling (#19135)
The logic currently present occasionally fails to enable reporting for
some PRs.
2025-07-16 15:10:06 -07:00
Dustin L. Howett
e7939bb4e3
Remove WinRT composition (inheritance) from PaletteItem (#19132)
Right now, we construct **two objects** for every palette item: the
derived type and the base type. It's unnnecessary.

This pull request replaces WinRT composition with a good old-fashioned
`enum ThingType`.

This also removes many of our palette items from our IDL. The only ones
that are necessary to expose via our WinRT API surface are the ones that
are used in XAML documents.

I originally removed the caching for `Command.Name`, but it turns out
that something calls `Name` roughly 17 times **per command** and having
the generator running that often is a serious waste of CPU.

## Validation Steps
- [x] Tab Switcher still live-updates when it is in use
- [x] Command searching still works
- [x] Commandline mode still works
- [x] Suggestions control still works
2025-07-16 15:09:17 -05:00
Dustin L. Howett
bdf44322f8
Expose a library's Resource Loader, allow a user to "subset" it (#19131)
This pull request elevates ScopedResourceLoader to the API surface of
LibraryResources, which will allow any library resource consumer to
directly interact with its resource loader.

One of those new interactions is to make a sub-context with a specific
narrowed-down qualifier. Like this:

```c++
auto englishOnlyLoader = GetLibraryResourceLoader().WithQualifier(L"language", L"en-us");
/* auto foo = */ englishOnlyLoader.GetLocalizedString(USES_RESOURCE(L"AppName"));
```
2025-07-14 22:43:48 +00:00
Leonard Hecker
f2b30b4e1e
Improve TSF color filtering logic (re: QQPinyin) (#19117)
If an IME provider sets both `crText` and `crBk` we should respect this,
but the previous logic would incorrectly assert for `crLine !=
TF_CT_NONE`.

## Validation Steps Performed
 I'm not aware which TSF even sets these colors in a
way that's compatible with us in the first place...
2025-07-14 17:19:10 -05:00
Dustin L. Howett
0cbb6b1f2f
Rewrite HighlightedTextControl and remove HighlightedText (#19130)
`HighlightedTextControl` is a XAML user control that contains a text
block and takes vector of `HighlightedText`. `HighlightedText` uses
tuples `(string, boolean)`. Allocating an entire object to store a
string and an integer felt like a waste, especially when we were doing
it thousands of times for the command palette _and just to pass them
into another object that stores a string and a few more integers
(`Run`)._

The new `HighlightedTextControl` is a standard templated control, and
supports styling of both the inner text block and of the highlighted
runs.

It no longer takes a `HighlightedText`, but rather a standard string and
a set of runs (tuple `(int start, int end)`); these can be stored more
efficiently, and this change moves the construction of text and runs
directly into `HighlightedTextControl` itself as an implementation
detail rather than an API contract.

### XAML Properties

- `Text`: the string to highlight
- `HighlightedRuns`: a vector of `(start, end)` pairs, indicating which
  regions are intended to be highlighted. Can be empty (which indicates
  there is no highlight and that the entire string is styled normally.)
- `TextBlockStyle`: the `Style` applied to the inner text block;
  optional; allows consumers to change how both normal and highlighted
  text looks.
- `HighlightedRunStyle`: a `Style` applied only to the highlighted runs;
  optional; allows consumers to change how highlighted text looks. If
  left NULL, highlighted runs will be bold.

`HighlightedRunStyle` is a little bodgy. It only applies to `Run`
objects (which is fine, and XAML somewhat supports), but since `Run` is
not a `FrameworkElement`, it _doesn't actually have a `Style` member._
We need to crack open the style and apply it manually, entry by entry.
`FontWeight` is special because XAML is a special little flower.
2025-07-14 20:40:20 +00:00
Dustin L. Howett
f14718f738
version: fix the LCID in our VERSIONINFO, add descriptions to each file (#19114)
Closes #19106
2025-07-09 16:36:13 -05:00
Dustin L. Howett
c4fbb58f69
During session save, use the profile's GUID rather than its Name (#19113)
This will prevent Terminal from erroneously selecting a hidden (deleted,
disabled or otherwise) profile of the same name during restoration and
subsequently using the wrong settings.

I am not certain why we used the name at all!

Closes #19105
2025-07-09 15:42:23 -05:00
Dustin L. Howett
02f173d504
Include the hash of the SID in the Window Class and Mutant (#19109)
Right now, we do not use a sufficiently unique name to disambiguate
Terminal instances running on the same desktop.

Mutexes (mutants) are named objects that live in the user's session,
under `Sessions\1\BaseNamedObjects` (for the local desktop session).
When multiple users are logged into the same session--such as with "Run
as different user"--they share a local BaseNamedObjects namespace. Ugh.

We cannot use [`CreatePrivateNamespace`] as it requires a boundary
descriptor, and the only boundary descriptors supported by the current
API are based on package identity. I also fear that
`CreatePrivateNamespace` is subject to a race condition with
`OpenPrivateNamespace`; Create will not Open an existing one, so we
would need to back off and retry either opening or creating. Yuck.

After this commit, we will hash the user's SID into the name of both the
window class and the mutant, right after the path hash (if running
unpackaged).

Closes #18704

[`CreatePrivateNamespace`]:
https://learn.microsoft.com/en-us/windows/win32/api/winbase/nf-winbase-createprivatenamespacea
2025-07-08 17:27:21 -05:00
Leonard Hecker
ac07afebcb
Fix a crash during commandline handoff (#19096)
The crash occurs because WinRT `abort()`s when it encounters
a `std::wstring_view` without null-terminator.

Closes #19093

## Validation Steps Performed
* Set `wtd` as the default terminal
* Launch `cmd`
* Launch `wtd`
* 2 windows 
2025-07-03 22:19:12 +00:00
Dustin L. Howett
4500d42831
build: enable the compliance theatre build options (#19094)
This makes some compiler warnings into actual bug reports that get filed
on us.
2025-07-03 19:16:04 +02:00
Leonard Hecker
97f0a06fbe
Fix another VT input double-encoding issue (#19083)
Closes #17264
Closes https://github.com/microsoft/edit/issues/182

Long shot, but probably also...
Closes #18579
Closes #19082
2025-07-02 16:49:33 -07:00
Dustin L. Howett
43b59d504b
build: partially revert AzCopy changes from 22c509f (#19092)
When we first transitioned to the `R1` network isolation
environment--which required us to _not_ contact
powershellgallery.com--we had to give up on the `AzureFileCopy` task.

Since then, the `AzurePowerShell` task has also become somewhat broken
while OneBranch fixed the issue that prevented us from using
`AzureFileCopy`.

In short, we now need to:

- Install the Azure PowerShell modules directly from our own feed (which
satisfies the network constraint)
- ... using `PSResourceGet` ...
- ... for Windows PowerShell 5.1 ...
- which is used by `AzureFileCopy` to later perform authentication.
2025-07-02 23:01:39 +00:00
Leonard Hecker
a25d968fe0
Move ConPTY handoff logic into WindowEmperor (#19088)
This changes the ConPTY handoff COM server from `REGCLS_SINGLEUSE`
to `REGCLS_MULTIPLEUSE`. The former causes a race condition, because
handoff runs concurrently with the creation of WinUI windows.
This can then result in the a window getting the wrong handoff.

It then moves the "root" of ConPTY handoff from `TerminalPage`
(WindowEmperor -> AppHost -> TerminalWindow -> TerminalPage)
into `WindowEmperor` (WindowEmperor).

Closes #19049

## Validation Steps Performed
* Launching cmd from the Start Menu shows a "Command Prompt" tab 
* Win+R -> `cmd` creates windows in the foreground 
* Win+R -> `cmd /c start /max cmd` creates a fullscreen tab 
  * This even works for multiple windows, unlike with Canary 
* Win+R -> `cmd /c start /min cmd` does not work 
  * It also doesn't work in Canary, so it's not a bug in this PR 
2025-07-01 19:00:00 +00:00
Leonard Hecker
fc0a06c3b6
Preserve the cursor row during Clear Buffer (#18976)
Introduces an ABI change to the ConptyClearPseudoConsole signal.
Otherwise, we have to make it so that the API call always retains
the row the cursor is on, but I feel like that makes it worse.

Closes #18732
Closes #18878

## Validation Steps Performed
* Launch `ConsoleMonitor.exe`
* Create some text above & below the cursor in PowerShell
* Clear Buffer
* Buffer is cleared except for the cursor row 
* ...same in ConPTY 
2025-06-25 16:31:28 +00:00
Carlos Zamora
6bf315a4c9
Fix crash when closing multiple panes simultaneously (#19023)
Fixes a crash when multiple panes were closed simultaneously (i.e. using
broadcast input).

The root cause of this crash was that we would get a null pointer
exception when trying to access a member/function off of a null
`_content`. This is because `Pane::_CloseChild()` would always pass over
the content from the non-closed pane and attempt to hook everything up
to it.

The fix was to operate similarly to `Pane::Close()` and raise a `Closed`
event and return early. Since there's no alternative content to attach
to, might as well just close the entire pane. This propagates up the
stack of listeners to update the UI appropriately and close the parent
pane and eventually the entire tab, if necessary.
 
Closes #18071
Closes #17432

## Validation Steps Performed
1. Open 2 panes
2. Use broadcast input to send "exit" to both panes
3.  Terminal doesn't crash and the tab closes gracefully
2025-06-24 14:58:33 -07:00
Dustin L. Howett
cf95460a26
Try to get the client name during DefTerm handoff (#19014) 2025-06-24 23:33:27 +02:00
James Pack
6e1f4a72be
Add arm64 build support to the build script (#18946)
It built successfully following the documentation on my Snapdragon
Surface Laptop :)
2025-06-24 15:56:49 -05:00
Josh Soref
9c452cd985
Upgrade to check-spelling v0.0.25 (#18940)
- Various spelling fixes
- Refresh metadata (including dictionaries)
- Upgrade to v0.0.25

## Validation Steps Performed

- check-spelling has been automatically testing this repository for a
while now on a daily basis to ensure that it works fairly reliably:
https://github.com/check-spelling-sandbox/autotest-check-spelling/actions/workflows/microsoft-terminal-spelling2.yml

Specific in-code fixes:
- winget
- whereas
- tl;dr
- set up
- otherwise,
- more,
- macbook
- its
- invalid
- in order to
- if
- if the
- for this tab,...
- fall back
- course,
- cch
- aspect
- archaeologists
- an
- all at once
- a
- `...`
- ; otherwise,

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2025-06-24 15:54:04 -05:00
Carlos Zamora
218c9fbe3e
Display a warning if SUI is unable to write to the settings file (#19027)
Adds logic to display a warning popup if the settings.json is marked as
read-only and we try to write to the settings.json file. Previously,
this scenario would crash, which definitely isn't right. However, a
simple fix of "not-crashing" wouldn't feel right either.

This leverages the existing infrastructure to display a warning dialog
when we failed to write to the settings file. The main annoyance here is
that that popup dialog is located in `TerminalWindow` and is normally
triggered from a failed `SettingsLoadEventArgs`. To get around this,
`CascadiaSettings::WriteSettingsToDisk()` now returns a boolean to
signal if the write was successful; whereas if it fails, a warning is
added to the settings object. If we fail to write to disk, the function
will return false and we'll raise an event with the settings' warnings
to `TerminalPage` which passes it along to `TerminalWindow`.

Additionally, this uses `IVectorView<SettingsLoadWarnings>` as opposed
to `IVector<SettingsLoadWarnings>` throughout the relevant code. It's
more correct as the list of warnings shouldn't be mutable and the
warnings from the `CascadiaSettings` object are retrieved in that
format.

## Validation Steps Performed
-  Using SUI, save settings when the settings.json is set to read-only

Closes #18913
2025-06-24 20:06:03 +00:00
S. M. Mohiuddin Khan Shiam
3680e13bc0
hygiene: fix mutable default argument in vttests/common.py::sgr_n (#19028)
sgr_n previously used a mutable list (`seq=[]`) as its default parameter.
In Python, default arguments are instantiated once at
function‐definition time and then shared across all calls.
If any caller mutated that list (e.g., `seq.append(...)`), later
invocations would inherit the mutated state, producing unpredictable or
corrupted VT-test sequences.
2025-06-24 14:19:22 -05:00
Chawye Hsu
1980e725ab
schema: add Microsoft.WSL profile source to schema, width its type (#19047)
WSL now generates profiles with the source named `Microsoft.WSL`, this
PR adds the value to the profile schema.

Refs #18231
2025-06-23 18:55:46 -05:00
James Holderness
00ee88400a
Indicate support for OSC 52 in the DA1 report (#19034)
## Summary of the Pull Request
Some applications that make use of the `OSC 52` clipboard sequence will
only do so if they can be certain that the terminal actually has that
functionality. Indicating our support for `OSC 52` in the `DA1` report
will give them an easy way to detect that.

## References and Relevant Issues
`OSC 52` support was added to Windows Terminal in issue #5823, and to
ConHost in issue #18949.

## Detailed Description of the Pull Request / Additional comments
Support for writing to the clipboard is indicated in the primary device
attributes report by the extension parameter `52`. This is obviously not
a standard DEC extension, but it's one that's been agreed upon by a
number of modern terminals. The extension is only reported when writing
to the clipboard is actually permitted (Windows Terminal has an option
to disable that).

## Validation Steps Performed
I've updated the Device Attributes unit test to check that we're
reporting extension `52` when clipboard access is enabled, and not
reporting it when disabled.

## PR Checklist
- [x] Closes #19017
- [x] Tests added/passed
2025-06-19 01:13:00 +00:00
Dustin L. Howett
4cf492e36b
build: adjust for changes in the Az.Accounts module (#19020) 2025-06-18 16:04:45 -07:00
Windows Console Service Bot
8a01833489
Localization Updates - main - 06/14/2025 03:04:55 (#19035) 2025-06-17 03:42:04 +00:00
Leonard Hecker
b47fdfc7e6
Fix support for the Tencent QQPinyin IME (#19046) 2025-06-16 23:52:26 +00:00
Dustin L. Howett
f28bb42979
Gently rework icon and background image validation (#19044)
Right now, image validation accepts web-sourced icons (boo) and rejects
images whose paths begin with `\\?\`. In addition, it will warn the user
for things out of their control like images set by fragments.

This pull request adds a filesystem path validator (which accepts images
with fully-qualified paths and UNC paths), makes the URI validator
reject any web-origin URIs (only `file` and `ms-*` are allowable), and
suppresses warnings for any images that were not _directly_ set by the
user.

Since we want to avoid using fragment images that fail validation, we no
longer `Clear` each image property but rather set it to the blank or
fallback value.

This does **not** actually add support for images at absolute paths
beginning with `\\?\`. Such images are still rejected by `Image` and the
other XAML fixtures we use for images. It's better than a warning,
though.

Closes #18703
Closes #14143
Refs #18710
Refs #5204
Related to #18922 (http-origin icons will be blank everywhere and not
just the jump list ;))
2025-06-16 23:01:35 +00:00
James Pack
098da6ce1c
Replace newline literal in AtlasEngine Readme with <br> tag (#19041) 2025-06-16 13:37:45 +00:00
Carlos Zamora
bd7e3179ff
Manually focus panes after swapping them (#19024) 2025-06-13 17:43:13 -05:00
Katherine Reynolds
bb62ce9345
Improve VS profile generation (#19025)
* Make PowerShell profile generation try to find `pwsh.exe` before
falling back to legacy powershell
* Make profiles generated on an `arm64` host work properly

## Validation Steps Performed

* Local build ran
* Verified the new `arm64` profile works
* Verified `pwsh.exe` is used if present
* Verified `powershell.exe` is used if `pwsh` is not present in path
* Verified we don't attempt to create `arm64` host cmd/pwsh profiles if
VS is not >= 17.4
2025-06-13 17:41:10 -05:00
Carlos Zamora
685499df3a
Automatically enable AdjustIndistinguishableColors if High Contrast mode enabled (#17346)
If High Contrast mode is enabled in the OS settings, we now
automatically enable `adjustIndistinguishableColors`. To accomplish
this, a new `Automatic` value is added to
`adjustIndistinguishableColors`. When it's chosen, color nudging doesn't
occur in regular contrast sessions, but we interpret the value as
`Indexed` respectively.

The new default value is `AutomaticIndexed`. Meaning that regular
contrast sessions will see no difference in behavior. However, if they
switch to high contrast mode, Windows Terminal will interpret the value
as `Indexed` at runtime. This was chosen because `Always` is more
performance intensive.
  
## References and Relevant Issues
#12999

## Validation Steps Performed
 Toggling High Contrast mode immediately triggers an updated terminal
instance with `adjustIndistinguishableColors`
2025-06-13 15:38:40 -07:00
James Pack
7a9fb76955
Ensure items is not null before checking its size so we dont crash (#19026)
Prevents a crash when no storage items are returned from a dropped path.

Terminal no longer crashes when a relative path is dragged and dropped
into the tool.

Closes #19015
2025-06-13 00:34:51 +00:00
Muhammad Danish
ad14922874
build: update WinGet publish script to use env var instead of --token (#19021)
With the latest winget-create release, the preferred method for
providing the GitHub token in CI/CD environment is via the environment
variable `WINGET_CREATE_GITHUB_TOKEN`. Removed use of `--token` and
switched to environment variable. See https://aka.ms/winget-create-token
for details.
2025-06-11 21:56:57 +00:00
James Holderness
557a193cb7
Improve correctness of Sixel background fill (#18260)
This is an attempt to improve the correctness of the background fill
that the Sixel parser performs when an image is scrolled because it
doesn't fit on the screen.

This new behavior may not be exactly correct, but does at least match
the VT330 and VT340 hardware more closely than it did before.

The initial Sixel parser implementation was in PR #17421.

When a Sixel image has the background select parameter set to 0 or 2, it
fills the background up to the active raster attribute dimensions prior
to writing out any actual pixel data. But this fill operation is clamped
at the boundaries of the screen, so if the image doesn't fit, and needs
to scroll, we have to perform an additional fill at that point to cover
the background of the newly revealed rows (this is something we weren't
doing before).

This later fill uses the width of the most recent raster attributes
command, which is not necessarily the same as the initial background
fill, and fills the entire height of the new rows, regardless of the
height specified in the raster attributes command.

## Validation Steps Performed

Thanks to @al20878 and @hackerb9, we've been able to test on both a
VT330 and a VT340, and I've confirmed that we're matching the behavior
of those terminals as closely as possible. There are some edge cases
where they don't agree with each other, so we can't always match both.

I've also confirmed that the test case in issue #17946 now matches what
the OP was expecting, and the test case in #17887 at least works more
consistently now when scrolling (this is not what the OP was expecting
though).

Closes #17887
Closes #17946
2025-06-10 19:04:56 -05:00