Adds a telemetry provider to the Terminal.Settings.Editor project as
well as new telemetry events to track traffic through the settings UI.
Specifically, the following events were added:
- `NavigatedToPage`: Event emitted when the user navigates to a page in
the settings UI
- Has a `PageId` parameter that includes the identifier of the page that
was navigated to
- (conditionally added when PageId = `page.editColorScheme`)
`SchemeName` parameter tracks the name of the color scheme that's being
edited
- conditionally added when PageId = `page.extensions`:
- `ExtensionPackageCount`: The number of extension packages displayed
- `ProfilesModifiedCount`: The number of profiles modified by enabled
extensions
- `ProfilesAddedCount`: The number of profiles added by enabled
extensions
- `ColorSchemesAddedCount`: The number of color schemes added by enabled
extensions
- conditionally added when PageId = `page.extensions.extensionView`:
- `FragmentSource`: The source of the fragment included in this
extension package
- `FragmentCount`: The number of fragments included in this extension
package
- `Enabled`: The enabled status of the extension
- (conditionally added when PageID = `page.newTabMenu`) if the page is
representing a folder view
- conditionally added when PageID = `page.profile.*`:
- `IsProfileDefaults`: if the modified profile is the profile.defaults
object
- `ProfileGuid`: the guid of the profile that was navigated to
- `ProfileSource`: the source of the profile that was navigated to
- conditionally added when PageID = `page.profile` (aka the base profile
page):
- `Orphaned`: tracks if the profile was orphaned
- `Hidden`: tracks if the profile is hidden
- (conditionally added when PageID = `page.profile.appearance`)
`HasBackgroundImage`: `if the profile has a background image defined`
- (conditionally added when PageID = `page.profile.appearance`)
`HasUnfocusedAppearance`: `if the profile has an unfocused appearance
defined`
- `AddNewProfile`: Event emitted when the user adds a new profile
`IsExtensionView` parameter tracks if the page is representing a view of
an extension
- Has a `Type` parameter that represents the type of the creation method
(i.e. empty profile, duplicate)
- `ResetApplicationState`: Event emitted when the user resets their
application state (via the UI)
- `ResetToDefaultSettings`: Event emitted when the user resets their
settings to their default value (via the UI)
- `OpenJson`: Event emitted when the user clicks the Open JSON button in
the settings UI
- Has a `SettingsTarget` parameter that represents the target settings
file (i.e. settings.json vs defaults.json)
- `CreateUnfocusedAppearance`: Event emitted when the user creates an
unfocused appearance for a profile
- `IsProfileDefaults`: if the modified profile is the profile.defaults
object
- `ProfileGuid`: the guid of the profile that was navigated to
- `ProfileSource`: the source of the profile that was navigated to
- `DeleteProfile`: Event emitted when the user deletes a profile
- also includes `ProfileGuid`, `ProfileSource`, `Orphaned` from the
`NavigatedToPage` section above
The page ids can be reused later as a serialized reference to the page.
We already use the one for the extensions page for the "new" badge.
(cherry picked from commit 7578209be5)
Service-Card-Id: PVTI_lADOAF3p4s4Axadtzgc2p-8
Service-Version: 1.23
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
(cherry picked from commit 7a9fb76955)
Service-Card-Id: PVTI_lADOAF3p4s4Axadtzgd5l6I
Service-Version: 1.23
This works around a bug in WinUI where it creates a single context
menu/flyout for text elements per thread, not per `XamlRoot`, similar to
many other areas. Since the `XamlRoot` cannot change after creation,
this means that once you've opened the flyout, you're locked into that
window (= XAML root) forever. You can't open the flyout in another
window and once you've closed that window, you can't open it anywhere at
all.
Closes#18599
* Flies out right click in the
* About dialog ✅
* Search dialog ✅
* Word delimiters setting ✅
* Launch size setting ✅
* Across two windows ✅
(cherry picked from commit 076746a7a6)
Service-Card-Id: PVTI_lADOAF3p4s4Axadtzgd5l-U
Service-Version: 1.23
Fixes a few issues with some telemetry events:
- The macro is organized as such: `TraceLoggingX(value, argName,
[argDescription])`. A few args had a description set on the spot where
the name should be. I added a name for a few of these.
- `TraceLoggingBool` --> `TraceLoggingInt32` for `themeChoice` (we
shouldn't be casting the evaluated int as a bool; it loses some of the
data we care about)
- improves the description for `themeChoice` to include information
about the legacy values
Checked through all our telemetry events and all of the args have a
proper name set. We tend to use `TraceLoggingValue` too which
automatically figures out the type that's being used, so that's also
handled.
(cherry picked from commit 7055b99acc)
Service-Card-Id: PVTI_lADOAF3p4s4AxadtzgdzQck
Service-Version: 1.23
Due to an unexpected decision on behalf of the Azure Artifacts folks,
the default view for a feed with upstream sources reports all packages,
even if they are not actually populated into the feed.
This results in (uncontrolled) 401 errors whenever a new package appears
upstream, because the feed tells our users and our build system that it
is available, but fails when the download actually begins because it is
not allowed to "write" the upstream version to the feed.
(cherry picked from commit abaa9488d9)
Service-Card-Id: PVTI_lADOAF3p4s4AxadtzgdnCVw
Service-Version: 1.23
An alternative approach for #18291. Improves perf by ~7%.
(cherry picked from commit 6b19d21845)
Service-Card-Id: PVTI_lADOAF3p4s4Axadtzgdm49M
Service-Version: 1.23
Windows 11 uses some additional signals to determine what the user cares
about and give it a bit of a QoS boost. One of those signals is whether
it is associated with a window that is in the foreground or which has
input focus.
Association today takes two forms:
- Process has a window which is in the foreground or which has input
focus
- Process has a *parent* that meets the above criterion.
Console applications that are spawned "inside" terminal by handoff do
not fall into either bucket. They don't have a window. Their parent is
`dllhost` or `explorer`, who is definitely not in focus.
We are piloting a new API that allows us to associate those processes
with Terminal's window.
When Terminal is in focus, it will attach every process from the active
tab to its QoS group. This means that whatever is running in that tab
is put into the "foreground" bucket, and everything running in other
background tabs is not.
When Terminal is out of focus, it attaches every process to its QoS
group. This ensures that they all go into the "background" bucket
together, following the window.
(cherry picked from commit 0d23624fa9)
Service-Card-Id: PVTI_lADOAF3p4s4Axadtzgdh6-Q
Service-Version: 1.23
In #16172, we removed the propagation of the profile down into the
Terminal Pane Content.
It was holding on to the profile from the _old_ settings model (😱).
This also broke background image hot reload.
(cherry picked from commit 666a75bc70)
Service-Card-Id: PVTI_lADOAF3p4s4AxadtzgdVVHA
Service-Version: 1.23
Closes#19152
## Validation Steps Performed
* Set `PATH` on a linux profile
* `PATH` isn't messed up inside WSL ✅
(cherry picked from commit 0a6394270e)
Service-Card-Id: PVTI_lADOAF3p4s4AxadtzgdR6bA
Service-Version: 1.23
- Modify the cursor repositioning logic to check if a selection is in
progress
- Only reposition the cursor when the mouse is used for positioning, not
during selection operations
Closes#19181
(cherry picked from commit 88ab154f22)
Service-Card-Id: PVTI_lADOAF3p4s4AxadtzgdSbu4
Service-Version: 1.23
AdaptDispatch has a TODO item indicating that we should *not* consider a
row wrapped until we write into the cell beyond it. We actually do have
that logic (it even refers to it!), but we still set the wrap flag when
we fill the final column.
We never removed it because it broke the old VT rendering-based ConPTY
implementation.
Now that VtEngine is gone, so can be this code and this strange
workaround for a problem nobody was quite sure what was.
This will fix, hopefully, the last of our exact line length write wrap
issues. tmux users can finally rejoice.
Closes#8976Closes#15602
(cherry picked from commit 14993db1cb)
Service-Card-Id: PVTI_lADOAF3p4s4AxadtzgaWx6A
Service-Version: 1.23
Closes#17515
## Validation Steps Performed
* Disable the ASB while there's a pending cooked read
* Type some text
* No crash ✅
(cherry picked from commit dfcc8f3c62)
Service-Card-Id: PVTI_lADOAF3p4s4AxadtzgdFoBM
Service-Version: 1.23
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
(cherry picked from commit e818dafa6d)
Service-Card-Id: PVTI_lADOAF3p4s4AxadtzgdFukU
Service-Version: 1.23
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>
(cherry picked from commit 7d6e0c8b8e)
Service-Card-Id: PVTI_lADOAF3p4s4AxadtzgdDF2w
Service-Version: 1.23
## 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.
(cherry picked from commit 8c20d2052d)
Service-Card-Id: PVTI_lADOAF3p4s4Axadtzgc0Dws
Service-Version: 1.23
Disables a controversial part of #19044.
Refs #19075
(cherry picked from commit 7b841628df)
Service-Card-Id: PVTI_lADOAF3p4s4Axadtzgcqq7A
Service-Version: 1.23
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...
(cherry picked from commit f2b30b4e1e)
Service-Card-Id: PVTI_lADOAF3p4s4Axadtzgck4T0
Service-Version: 1.23
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
(cherry picked from commit c4fbb58f69)
Service-Card-Id: PVTI_lADOAF3p4s4AxadtzgcbMe0
Service-Version: 1.23
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
(cherry picked from commit 02f173d504)
Service-Card-Id: PVTI_lADOAF3p4s4AxadtzgYvcQw
Service-Version: 1.23
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 ✅
(cherry picked from commit ac07afebcb)
Service-Card-Id: PVTI_lADOAF3p4s4AxadtzgcO9T4
Service-Version: 1.23
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 ✅
(cherry picked from commit a25d968fe0)
Service-Card-Id: PVTI_lADOAF3p4s4AxadtzgbpecU
Service-Version: 1.23
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#18732Closes#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 ✅
(cherry picked from commit fc0a06c3b6)
Service-Card-Id: PVTI_lADOAF3p4s4Axadtzga5M7E
Service-Version: 1.23
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#18071Closes#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
(cherry picked from commit 6bf315a4c9)
Service-Card-Id: PVTI_lADOAF3p4s4Axadtzgb3LNk
Service-Version: 1.23
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.
- ✅ Using SUI, save settings when the settings.json is set to read-only
Closes#18913
(cherry picked from commit 218c9fbe3e)
Service-Card-Id: PVTI_lADOAF3p4s4Axadtzgb3QSk
Service-Version: 1.23
## Summary of the Pull Request
Adds branding and distribution metadata to the following telemetry
events:
- ActionDispatched (branding only)
- JsonSettingsChanged
- UISettingsChanged
- SessionBecameInteractive
Also removes the settings logger output from the debugger and some
leftover debugging functions.
Adds a label to the XSettingsChanged settings value to make it easier to
read on the backend.
(cherry picked from commit b50eaa19e0)
Service-Card-Id: PVTI_lADOAF3p4s4Axadtzgaj8x4
Service-Version: 1.23
## 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
(cherry picked from commit 00ee88400a)
Service-Card-Id: PVTI_lADOAF3p4s4Axadtzgbpe4g
Service-Version: 1.23
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#18703Closes#14143
Refs #18710
Refs #5204
Related to #18922 (http-origin icons will be blank everywhere and not
just the jump list ;))
(cherry picked from commit f28bb42979)
Service-Card-Id: PVTI_lADOAF3p4s4AxadtzgbjZlM
Service-Version: 1.23
* 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
(cherry picked from commit bb62ce9345)
Service-Card-Id: PVTI_lADOAF3p4s4AxadtzgbeRwg
Service-Version: 1.23
I can't explain this, but VS 17.14 ships with VisualCpp.Tools.Core
version 14.44.35208 but the files say 14.44.35207.
(cherry picked from commit 9dbcf4b9dd)
Service-Card-Id: PVTI_lADOAF3p4s4AxadtzgbDfzM
Service-Version: 1.23
Looks like there's a new VS version on the build agents. This just goes
through and fixes any issues they found.
There's still a COMPILER CRASH though.
(cherry picked from commit 2d64a3a4ab)
Service-Card-Id: PVTI_lADOAF3p4s4AxadtzgakG1s
Service-Version: 1.23
Once an application has returned from handling `WM_ENDSESSION`
the OS may kill the app at any point. This means we must
persist our state while inside the message handler.
Closes#17179
Honestly, none. It's a race condition in the first place.
(cherry picked from commit 26cd15a14b)
Service-Card-Id: PVTI_lADOAF3p4s4AxadtzgaZoI8
Service-Version: 1.23
When the cursor is over the non-client area it wouldn't
show the cursor when moving it. Now it works as expected.
(cherry picked from commit 4d094df508)
Service-Card-Id: PVTI_lADOAF3p4s4AxadtzgaZJvk
Service-Version: 1.23
I finally realized the missing piece.
We need to clear the state array unconditionally,
as otherwise it won't get cleared. Duh.
Closes#18584
## Validation Steps Performed
* Craft a state.json with a layout
* Launch Terminal while the feature is disabled
* state.json is cleaned up on exit ✅
(cherry picked from commit 69fc2d94ee)
Service-Card-Id: PVTI_lADOAF3p4s4AxadtzgaZGpY
Service-Version: 1.23
They're much prettier, but some users may not be 100% happy.
(cherry picked from commit 696dac2c6a)
Service-Card-Id: PVTI_lADOAF3p4s4AxadtzgaWoFc
Service-Version: 1.23
We never hooked up this callback!
This allows a CLI application to emit text directly to the clipboard.
(cherry picked from commit c64a9d2a32)
Service-Card-Id: PVTI_lADOAF3p4s4AxadtzgaWn6c
Service-Version: 1.23
Went through the settings UI and checked which other setting containers
were missing a preview. Here's the list:
- starting directory
- tab title
- background image
- answerback message
- bell style
Adding them was fairly straightforward. Tried to reuse existing
resources when possible. The general pattern was to add a
"Current<Setting>" or "<Setting>Preview" getter that just created the
human-readable format of the setting.
## Validation Steps Performed
✅ value is shown (including special values!)
✅ each of these work with a screen reader
Closes#18576
(cherry picked from commit 7359df0382)
Service-Card-Id: PVTI_lADOAF3p4s4AxadtzgaWgOw
Service-Version: 1.23
The `SGR 1` VT attribute can either be interpreted as a brighter color,
or as a bolder font, depending on the _Intense text style_ setting.
However, the concept of brightness only applies to the eight standard
ANSI colors, so when `SGR 1` is configured as _bright_, it has no effect
on the ITU T.416 colors (RGB and the 256 index colors).
To address that, we now interpret `SGR 1` as a bolder font when applied
to ITU colors, regardless of whether the _Intense text style_ option is
set to bold or not.
Note that this only applies to the Atlas render engine, since the GDI
engine doesn't support bold fonts.
## Validation Steps Performed
I've manually tested `SGR 1` applied to different color formats with the
_Intense text style_ option set to _None_, and confirmed that the text
is now rendered with a bold font for ITU colors, but not for ANSI/AIX
colors.
Closes#18284
(cherry picked from commit 07c9a99273)
Service-Card-Id: PVTI_lADOAF3p4s4AxadtzgaWKqk
Service-Version: 1.23
This fixes#18877, by iteratively checking to see if a line is wrapped
and moving up or down accordingly.
**Current behavior:** When a user triple-clicks on a line that’s
visually wrapped by the terminal, only the single physical row that was
clicked gets selected.
**Expected behavior:** A triple-click like in xterm, should select the
entire logical line including all of its wrapped segments, from the true
start through its true end, regardless of where the wrap occurred.
**Why it matters:** Logical line selection is what users expect when
they’re trying to grab one command or output block in full. Limiting the
selection to just the current physical row can lead to copy/paste
mistakes and a confusing experience whenever a long line wraps.
## Validation Steps Performed
I ran the existing tests using `Invoke-OpenConsoleTests` and they were
passing and I was also able to test the build on my machine. I added a
test case as well
## PR Checklist
Closes#18877
(cherry picked from commit 976a54d87c)
Service-Card-Id: PVTI_lADOAF3p4s4AxadtzgaHgMU PVTI_lADOAF3p4s4AxadtzgaMvXs
Service-Version: 1.23
This fixes two issues in the WPF terminal control:
- The emoji picker and other IME candidate windows didn't show up in the
right place
- Submitting an emoji via the emoji picker would result in two win32
input mode events with a VK of 65535 and the surrogate pair halves.
I am not sure I did the right thing with the thread TSF handle...
(cherry picked from commit 06f736bebe)
Service-Card-Id: PVTI_lADOAF3p4s4AxadtzgZ-Sw0
Service-Version: 1.23
According to the documentation, the final character of an SGR mouse
report is meant to be `M` for a button press and `m` for a button
release. However it isn't clear what the final character should be for
motion events, and we were using an `m` if there weren't any buttons
held down at the time, while all other terminals used an `M`, regardless
of the button state.
This PR updates our implementation to match what everyone else is doing,
since our interpretation of the spec was causing problems for some apps.
## Validation Steps Performed
I've manually tested the new behavior in Vttest, and confirmed that our
mouse reports now match Xterm more closely, and I've tested with v0.42.0
of Zellij, which was previous glitching badly in Windows Terminal, but
now works correctly.
I've also updated our unit tests for the SGR mouse mode to reflect the
correct report format.
Closes#18712
(cherry picked from commit 865f5e5239)
Service-Card-Id: PVTI_lADOAF3p4s4AxadtzgZ9_Ew
Service-Version: 1.23
This PR fixes two cases where image content wasn't correctly erased when
overwritten.
1. When legacy console APIs fill an area of the buffer using a starting
coordinate and a length, the affected area could potentially wrap over
multiple rows, but we were only erasing the overwritten image content on
the first affected row.
2. When copying an area of the buffer with text content over another
area that contained image content, the image in the target area would
sometimes not be erased, because we ignored the `_eraseCells` return
value which indicated that the image slice needed to be removed.
## References and Relevant Issues
The original code was from the Sixel implementation in PR #17421.
## Validation Steps Performed
I've manually verified that these two cases are now working as expected.
## PR Checklist
- [x] Closes#18568
(cherry picked from commit 08e76da3a1)
Service-Card-Id: PVTI_lADOAF3p4s4AxadtzgZ3XT4
Service-Version: 1.23