4769 Commits

Author SHA1 Message Date
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
James Holderness
4abc041eb7
Add support for OSC 52 clipboard copy in conhost (#18949)
This adds support for copying to the clipboard in conhost using the OSC
52 escape sequence, extending the original implementation which was for
Windows Terminal only.

The Windows Terminal implementation was added in PR #5823.

Because the clipboard can't be accessed from a background thread, this
works by saving the content in a global variable, and then posting a
custom message to the main GUI thread, which takes care of the actual
copy operation.

Validation:
I've manually confirmed that tmux copy mode is now able to copy to the
system clipboard.

Closes #18943
2025-06-10 20:09:51 +00:00
Niels Laute
155d8a9ab2
Tweak spacing on about dialog (#18993)
Some minor styling tweaks to the about page.

- Tweaking the spacing of the version-checking / update available text.
- Wrapping the hyperlinkbuttons in a StackPanel so it's easier to set a
negative margin so they are visually aligned with the version / title
text.

Closes #18994
2025-06-03 08:38:15 -07:00
e82eric
74b5a0c975
Update command palette search to prioritize "longest substring" match. (#18700)
It's the fzf algorithm!

Repurposed work from #16586
- I think the fzf algo fits here where it optimizes to find the optimal
  match based on consecutive chars and word boundaries.
- There are some edge cases where a match with a small gap could get a
  higher score than a match of consecutive chars when the match with a
  gap has other bonuses (FirstChar * Boundary Bonus). This can be
  adjusted by adjusting the bonuses or removing them if needed.
- From reading the thread in #6693 it looked like you guys were leaning
  towards something like the fzf algo.
- License file is now updated in
  https://github.com/nvim-telescope/telescope-fzf-native.nvim repository
  - https://github.com/nvim-telescope/telescope-fzf-native.nvim/pull/148
  - https://github.com/junegunn/fzf/issues/4310
- Removed the following from the original implementation to minimize
  complexity and the size of the PR. (Let me know if any of these should
  be added back).
  - Query expressions "$:StartsWith ^:EndsWith |:Or !:Not etc" 
- Slab to avoid allocating the scoring matrix. This felt like overkill
  for the number of items in the command pallete.
- Fallback to V1 algorithm for very long strings. I want to say that the
  command palette won't have strings this long.
- Added the logic from GH#9941 that copies pattern and text chars to
  string for comparision with lstrcmpi
  - It does this twice now which isn't great...

Closes #6693

---------

Co-authored-by: Leonard Hecker <lhecker@microsoft.com>
2025-06-03 00:22:24 +00:00
Carlos Zamora
37d5aec1cf
Replace extensions page hyperlink with fwlink (#18997) 2025-06-02 14:12:48 -05:00
Dustin L. Howett
9dbcf4b9dd
build: try even harder to find a working VC tools version (#18996)
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.
2025-06-02 18:27:22 +00:00
Carlos Zamora
3ae6bbf2df
Enable SSH Generator Feature Flag and polish UI (#18814) 2025-05-31 14:50:18 -05:00
Windows Console Service Bot
36162ae6b1
Localization Updates - main - 05/29/2025 03:05:25 (#18980) 2025-05-31 03:39:32 +00:00
Adaline Valentina Simonian
59590fc665
fix: don't render bidi isolates LRI, RLI, FSI, PDI (#18942)
Skips rendering LRI, RLI, FSI, and PDI "glyphs" in the terminal.

Does not implement BIDI/RTL; that is out of scope, see #538. This is
just a hotfix to stop spamming the console with undesired character
printouts. Once BIDI support is implemented, this change will (maybe?)
no longer be necessary.

Fixes #16574.
2025-05-30 17:06:39 +00:00
Carlos Zamora
e332c67f51
Add an Extensions page to the Settings UI (#18559)
This pull request adds an Extensions page to the Settings UI, which lets
you enable/disable extensions and see how they affect your settings
(i.e. adding/modifying profiles and adding color schemes). This page is
specifically designed for fragment extensions and dynamic profile
generators, but can be expanded on in the future as we develop a more
advanced extensions model.

App extensions extract the name and icon from the extension package and
display it in the UI. Dynamic profile generators extract the name and
icon from the generator and display it in the UI. We prefer to use the
display name for breadcrumbs when possible.

A "NEW" badge was added to the Extensions page's `NavigationViewItem` to
highlight that it's new. It goes away once the user visits it.

## Detailed Description of the Pull Request / Additional comments
- Settings Model changes:
   - `FragmentSettings` represents a parsed json fragment extension.
- `FragmentProfileEntry` and `FragmentColorSchemeEntry` are used to
track profiles and color schemes added/modified
- `ExtensionPackage` bundles the `FragmentSettings` together. This is
how we represent multiple JSON files in one extension.
   - `IDynamicProfileGenerator` exposes a `DisplayName` and `Icon`
- `ExtensionPackage`s created from app extensions extract the
`DisplayName` and `Icon` from the extension
- `ApplicationState` is used to track which badges have been dismissed
and prevent them from appearing again
- a `std::unordered_set` is used to keep track of the dismissed badges,
but we only expose a get and append function via the IDL to interact
with it
- Editor changes - view models:
   - `ExtensionsViewModel` operates as the main view model for the page.
- `FragmentProfileViewModel` and `FragmentColorSchemeViewModel` are used
to reference specific components of fragments. They also provide support
for navigating to the linked profile or color scheme via the settings
UI!
- `ExtensionPackageViewModel` is a VM for a group of extensions exposed
by a single source. This is mainly needed because a single source can
have multiple JSON fragments in it. This is used for the navigators on
the main page. Can be extended to provide additional information (i.e.
package logo, package name, etc.)
- `CurrentExtensionPackage` is used to track which extension package is
currently in view, if applicable (similar to how the new tab menu page
works)
- Editor changes - views:
- `Extensions.xaml` uses _a lot_ of data templates. These are reused in
`ItemsControl`s to display extension components.
- `ExtensionPackageTemplateSelector` is used to display
`ExtensionPackage`s with metadata vs simple ones that just have a source
(i.e. Git)
- Added a `NewInfoBadge` style that is just an InfoBadge with "New" in
it instead of a number or an icon. Based on
https://github.com/microsoft/PowerToys/pull/36939
- The visibility is bound to a `get` call to the `ApplicationState`
conducted via the `ExtensionsPageViewModel`. The VM is also responsible
for updating the state.
- Lazy loading extension objects
- Since most instances of Terminal won't actually open the settings UI,
it doesn't make sense to create all the extension objects upon startup.
Instead, we defer creating those objects until the user actually
navigates to the Extensions page. This is most of the work that happened
in `CascadiaSettingsSerialization.cpp`. The `SettingsLoader` can be used
specifically to load and create the extension objects.

## Validation Steps
 Keyboard navigation feels right
 Screen reader reads all info on screen properly
 Accessibility Insights FastPass found no issues
 "Discard changes" retains subpage, but removes any changes
 Extensions page nav item displays a badge if page hasn't been visited
 The badge is dismissed when the user visits the page

## Follow-ups
- Streamline a process for adding extensions from the new page
- Long-term, we can reuse the InfoBadge system and make the following
minor changes:
- `SettingContainer`: display the badge and add logic to read/write
`ApplicationState` appropriately (similarly to above)
   - `XPageViewModel`: 
- count all the badges that will be displayed and expose/bind that to
`InfoBadge.Value`
- If a whole page is new, we can just style the badge using the
`NewInfoBadge` style
2025-05-28 14:03:02 -05:00
Dustin L. Howett
3acb3d510b
bodgy: inline FillRow in FillTextBuffer to work around DD-2413379 (#18971)
Something about FillRow tickles the compiler and causes it to ICE during
LTCG.

See DD-2413379 for more.
DevCom:
https://developercommunity.visualstudio.com/t/VS-2022-1714-p11-cannot-complete-a-bui/10864784
2025-05-27 17:56:27 -05:00
Dustin L. Howett
c594fcc91b
fuzzing: make fuzzing work with vcpkg and the new library layout (#18970)
We need to replace the vcpkg "target triplet" configs with ones that
enable ASAN!
2025-05-27 17:56:11 -05:00
Carlos Zamora
2d64a3a4ab
Fix some build errors from updated VS build agents (#18927)
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.
2025-05-22 18:57:04 -05:00
Carlos Zamora
b50eaa19e0
Add branding and unpackaged metadata to a few telemetry events (#18926)
## 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.
2025-05-22 18:56:00 -05:00
Windows Console Service Bot
32feec087b
Localization Updates - main - 05/22/2025 23:06:26 (#18908) 2025-05-22 18:52:40 -05:00
Leonard Hecker
26cd15a14b
Eagerly persist on WM_ENDSESSION (#18912)
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

## Validation Steps Performed

Honestly, none. It's a race condition in the first place.
2025-05-22 18:02:58 -05:00
AgentK
a093ca3d54
Updated pane context menu (#18126)
## Motivation 
The motivation is that Windows users are more accustomed to working with
GUI Menus using a mouse, unlike Linux users.

## Summary of the Pull Request
added split pane with profile or duplicate up/down/left/right context
menus as submenu
added swap panes up/down/left/right context menus as submenu
added toggle pane zoom context menu
added close other panes context menu

## References :
- Relevant Issues : (#18137)

## Type of change :
- [x] New feature

---------

Co-authored-by: Mike Griese <migrie@microsoft.com>
2025-05-15 15:56:58 -07:00
Carlos Zamora
dd96ce4b8f
Apply localization and documentation fixes for regex code (#18914)
Applies some localization fixes for the regex strings and
Settings_ResetApplicationState.HelpText.
Also renames the `_validateX()` functions to
`_validateAndPopulateXRegex()` for clarity.
2025-05-14 21:47:01 +00:00
Leonard Hecker
076746a7a6
Implement custom text context menus to fix crashes (#18854)
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

## Validation Steps Performed
* Flies out right click in the
  * About dialog 
  * Search dialog 
  * Word delimiters setting 
  * Launch size setting 
* Across two windows 
2025-05-14 21:47:23 +02:00
Carlos Zamora
f769597d89
Persist window layout every few minutes (#18898)
If `persistedWindowLayout` is enabled, we now persist the window layout
every few minutes (excluding the text buffer).

This was done by adding a `SafeDispatcherTimer` to the `WindowEmperor`
that calls `PersistState()` every 5 minutes. For `BuildStartupKind`, I
split up `Persist` into `PersistAll` and `PersistLayout`. This way, we
go through all the same code flow that `Persist` had except for
specifically serializing the buffer.

## Validation Steps Performed
 (with the timer set to 3 seconds) create a window layout and ensure
the layout is restored after forcefully stopping Terminal (aka
simulating a "crash")

Closes #18838
2025-05-14 18:08:07 +00:00
Carlos Zamora
9e0ca3aac0
Add reset cache and settings buttons to SUI (#18907)
## Summary of the Pull Request
Adds the ability to reset the settings.json file and application state
via the Settings UI. Since these are destructive operations, the
destructive styling is applied, as well as a confirmation prompt
notifying the user that this occurs immediately.

## Validation Steps Performed
 "reset settings" results in the correct contents for settings.json and
state.json
 "reset cache" results in the correct contents for state.json

Closes #947
2025-05-14 10:34:41 -07:00
Carlos Zamora
92e8be41fd
Load .wt.json snippets from parent directories (#18904)
## Summary of the Pull Request
Adds logic such that local snippets from .wt.json files are imported not
only at the current directory, but also in the parent directories.

## References and Relevant Issues
Spec:
https://github.com/microsoft/terminal/blob/main/doc/specs/%231595%20-%20Suggestions%20UI/Snippets.md

## Validation Steps Performed
`D:\test\.wt.json`: contains `Hello --> hello (parent)`
`D:\test\inner_dir\.wt.json`: contains `Hello --> hello`

- In `D:\test\`...
   -  `Hello` command outputs `hello (parent)`
   -  commands from `inner_dir` not shown
- In `D:\test\inner_dir\`...
   -  `Hello` command outputs `hello`
   -  commands from `D:\test` are shown

## PR Checklist
Closes #17805
2025-05-14 10:34:12 -07:00
Carlos Zamora
4d67453c02
Replace New Tab Menu Match Profiles functionality with regex support (#18654)
## Summary of the Pull Request
Updates the New Tab Menu's Match Profiles entry to support regex instead
of doing a direct match. Also adds validation to ensure the regex is
valid. Updated the UI to help make it more clear that this supports
regexes and even added a link to some helpful docs.

## Validation Steps Performed
 Invalid regex displays a warning
 Valid regex works nicely
 profile matcher with source=`Windows.Terminal.VisualStudio` still
works as expected

## PR Checklist
Closes #18553
2025-05-14 10:30:05 -07:00
Leonard Hecker
4d094df508
Fix one source of mouse vanishing (#18911)
When the cursor is over the non-client area it wouldn't
show the cursor when moving it. Now it works as expected.
2025-05-14 17:25:20 +00:00
Leonard Hecker
69fc2d94ee
Clean up persisted windows after the feature is disabled (#18910)
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 
2025-05-14 19:04:13 +02:00
Dustin L. Howett
14993db1cb
Fix overeager pre-delayed-EOL wrapping in AdaptDispatch (#18899)
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 #8976
Closes #15602
2025-05-13 17:14:46 -07:00
Dustin L. Howett
696dac2c6a
wpf: force builtin glyphs (#18906)
They're much prettier, but some users may not be 100% happy.
2025-05-13 18:18:16 -05:00
Dustin L. Howett
c64a9d2a32
wpf: allow OSC 52 to write the clipboard (#18905)
We never hooked up this callback!

This allows a CLI application to emit text directly to the clipboard.
2025-05-13 18:18:05 -05:00
Carlos Zamora
7359df0382
Fix remaining settings container previews in SUI (#18888)
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
2025-05-13 13:39:22 -07:00
James Holderness
07c9a99273
Render SGR 1 as bold when used with ITU colors (#18903)
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
2025-05-13 17:53:13 +00:00
Carlos Zamora
064d9af46e
Bind "Clear buffer" action to Ctrl+Shift+K (#18900)
Closes #17894
2025-05-13 10:46:16 -07:00
Dustin L. Howett
f08321a0b2
build: fix the tsa config yet again (#18901)
We ship the org chart, baby!
2025-05-12 18:30:18 -07:00
Dustin L. Howett
545eaf258d
Update to TouchdownBuildTask v5 (#18896)
This is mandatory.
2025-05-12 16:06:22 -05:00
Muhammad Danish
95d021ac87
config: Use Microsoft.Windows.Settings module for enabling developer mode (#18886)
Using the Microsoft.Windows.Settings module is the now the recommended
way of configuring Windows Settings, including developer mode.
2025-05-09 23:13:18 +00:00
ALBIN BABU VARGHESE
976a54d87c
Allow triple-click to select logical line (#18885)
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
2025-05-09 23:00:46 +00:00
Dustin L. Howett
06f736bebe
wpf: use the new TSF implementation (#18861)
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...
2025-05-02 18:30:52 -05:00
James Holderness
865f5e5239
Fix SGR mouse movement reports (#18864)
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
2025-05-02 22:36:45 +00:00
Dustin L. Howett
58092f142f
Bring back changes required to build conhost-1.24 in Windows (#18856) 2025-05-02 14:27:28 -05:00