4460 Commits

Author SHA1 Message Date
Leonard Hecker
32eeefd89e
Add 10.0.26100.0 to MaxVersionTested (#18252)
As it turns out, you cannot use `<uap17:UpdateWhileInUse>`
(or any other newer namespace) unless you declare a corresponding
`MaxVersionTested` in your package manifest.
It does not appear that there's a reason for this, it just is.
`MaxVersionTested` is not to be confused with the `maxversiontested`,
which is something else entirely, but I updated it for safe measure.
Since `maxversiontested` is not a "max", but rather a list
of tested versions, it gets appended to the end of the list.

Closes #18119
2024-12-03 14:37:34 -06:00
Josh Soref
56dc9d1f98
Remove references to fabricbot (#18258)
Refs #18251
2024-12-02 12:23:52 -06:00
Leonard Hecker
924310481a
Fix infinite recursion in TSF (#18248)
The current `FindWindowOfActiveTSF` implementation can
result in infinite recursion which we must guard again.
This change is not tested as I don't know how to trigger
the issue to begin with (a missing CoreInput thread).
2024-11-26 10:39:03 -08:00
Leonard Hecker
adac6085b8
Defuse throttled_func when it's accidentally engaged (#18235)
This change prevents `throttled_func` from reading uninitialized memory
under some yet-unkown circumstances. The tl;dr is:
This simply moves the callback invocation into the storage.
That way we can centrally avoid invoking the callback accidentally.
2024-11-25 23:31:38 +00:00
Leonard Hecker
09d8ac44ad
Fix order and robustness of CTRL_*_EVENTs (#18233)
* This fixes a regression in 391abafc, which caused attached clients
  to receive CTRL_CLOSE_EVENTs, etc., in oldest-to-newest order,
  while historically the opposite is expected.
* It also changes the behavior of `ProcessCtrlEvents` to dispatch
  these events no matter whether a client is already dead.
  This restores the Windows XP to Windows 8.1 behavior.

Both of these fixes would address the issue on their own.

Closes #15373

## Validation Steps Performed
* CloseTest from our repository shows newest-to-oldest order again.
* node gets killed when run under npm and closing the tab.
2024-11-25 17:05:30 -06:00
Leonard Hecker
220c7cd92e
Revert "Dedup command history by default (#17852)" (#18229)
This reverts commit 5fdfd51209fc681e66657d6697ce031bc4319619,
because 3 people complained about this change VS 1 person
requesting the change to be made in the first place.

Closes #18138
Reopens #17797 for discussion
2024-11-25 17:03:37 -06:00
PankajBhojwani
184dfdc5ea
Fix UIMarkdown for Audit Mode (#18221) 2024-11-25 16:39:39 -06:00
AsciiWolf
919586c681
doc: Fix typo in CONTRIBUTING.md (#18243)
This PR fixes a very small typo (missing space) in the CONTRIBUTING.md
doc file.
2024-11-25 14:35:29 -08:00
Tsukasa OI
ae90d52bb1
Escape single quotes while translating dropped Win32 paths (#18007)
When file/folder is dropped to the terminal, its path is translated and
quoted with a pair of single quotes if necessary.

However, the terminal control does not escape single quotes (allowed in
the Win32 subsystem) that need escapes when translated.

On the translation styles other than `"none"` (note: all other
translation styles are currently intended for the POSIX shell), it
causes incorrect path to be pasted when the path contains one or more
single quotes (see #18006 for an example).

With this commit, the terminal control escapes a single quote with a
valid escape sequence `'\''` (finish quote, print a single quote then
begin quote again) when the path translation is required.

## History

### v1 → v2

* Changed escape sequence from `'"'"'` to much shorter `'\''`.
* Reflected comments by the reviewer.

### v2 → v3

* Overhaul after addition of multiple path translation styles (not just
WSL but Cygwin and MSYS).
* More clarification both in the code and in the commit message.

### v3 → v4 (current)

* Minor clarification both in the code and in the commit message.

## References and Relevant Issues

* #18006
* #16214
* #18195

## Detailed Description of the Pull Request / Additional comments

This is a follow-up of #16214 and #18195, fixing #18006.

Closes #18006
2024-11-23 12:34:21 -06:00
Dustin L. Howett
6047f37e84
build: fix arm64 vcpkg triplet selection error (#18239)
microsoft/vcpkg-tool#1474 now validates that the target triplet is
valid. Unfortunately, `ARM64` is not valid... despite VS defaulting to
it.

VS 17.12 moved to the newer version of the vcpkg tool.

Given that we still want to build on VS 17.12, this commit adds a local
workaround.

See DD-2302065 for the internal tracking bug.
 
See microsoft/vcpkg#42182 for the upstream fix.
2024-11-22 13:52:48 -08:00
Danny Weinberg
282670a092
Allow copying with ANSI escape code control sequences (#17059)
## Summary of the Pull Request

This extends the copy command to be able to include control sequences,
for use in tools that subsequently know how to parse and display that.

## References and Relevant Issues

https://github.com/microsoft/terminal/issues/15703

## Detailed Description of the Pull Request / Additional comments

At a high level, this:
- Expands the `CopyTextArgs` to have a `withControlSequences` bool.
- Plumbs that bool down through many layers to where we actuall get
  data out of the text buffer.
- Modifies the existing `TextBuffer::Serialize` to be more generic
  and renames it to `TextBuffer::ChunkedSerialize`.
- Uses the new `ChunkedSerialize` to generate the data for the copy
  request.

## Validation Steps Performed

To test this I've manually:
- Generated some styled terminal contents, copied it with the control
  sequences, pasted it into a file, `cat`ed the file and seen that it
  looks the same.
- Set `"firstWindowPreference": "persistedWindowLayout"` and
  validated that the contents of windows are saved and
  restored with styling intact.

I also checked that `Invoke-OpenConsoleTests` passed.

## PR Checklist
- [x] Closes #15703
- [ ] 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/756
- [x] Schema updated (if necessary)
2024-11-20 17:03:04 +01:00
Dustin L. Howett
a607029f07
Don't allow orphaned profiles to show up in the Default list (#18207) 2024-11-19 22:52:35 +00:00
Windows Console Service Bot
84d6b0fba0
Localization Updates - main - Orphaned and Path Translation (#18208) 2024-11-19 11:38:44 -08:00
Dustin L. Howett
068906714f
Add a new (advanced) profile setting, pathTranslationStyle (#18195)
`pathTranslationStyle` has four options:

- `none`: Do no translation
- `wsl`: Translate `C:\` to `/mnt/c` and `\\wsl$\Foo\bar` to `/bar`
- `cygwin`: Translate `C:\` to `/cygdrive/c`
- `msys2`: Translate `C:\` to `/c`

It is intended as a broadly-supported replacement for us checking the
source every time the user drops a path.

We no longer need to push the source name all the way down to the
control.

I am hesitant to commit to using other folks' product names in our
settings model,
however, these are almost certainly more recognizable than whatever
other weird
names we could come up with.

The Git Bash fragment extension profile could conceivably use
`pathTranslationStyle`
`msys2` to make sure drag/dropped paths look right.
2024-11-15 23:55:34 +00:00
Dustin L. Howett
90866c7c93
Retain (and indicate) orphaned dynamic profiles (#18188)
The original intent with dynamic profiles was that they could be
uninstalled but that Terminal would remember your settings in case they
ever came back.

After we implemented dynamic profile _deletion_, however, we
accidentally made it so that saving your settings after a dynamic
profile disappeared scoured it from the planet _forever_ (since we
remembered that we generated it, but now it was no longer in the
settings file).

This pull request implements:

- Tracking for orphaned dynamic profiles
- A new settings page for the profile that explains what happened
- Badging on the Navigation Menu indicating which profiles are orphaned
and which are hidden

Closes #14061
Closes #11510 
Refs #13916 
Refs #9997
2024-11-15 09:02:31 -08:00
Leonard Hecker
a8e83c1c0f
AtlasEngine: Better builtin glyphs (#18179)
This slightly modifies the builtin glyph width and corner radius to
more closely match Cascadia Mono. Previously, at low DPI (100% scale),
the corner radius was barely noticeable which looked kind of bad.
2024-11-15 14:37:28 +01:00
Leonard Hecker
cd1742454c
Use floating DIPs throughout the stack (#18027)
I sure hope I didn't break anything!
While `til::math` was a good idea its convenience led us to use it
in the only place where it absolutely must not be used: The UI code.
So, this PR replaces all those `til::point`s, etc., with floats.
Now we use DIPs consistently throughout all layers of the UI code,
except for the UIA area (that would've required too many changes).

## Validation Steps Performed
Launch, looks good, no obvious defects, UIA positioning seems ok. 
2024-11-15 04:26:10 -08:00
Jerry
91c96a60a7
Prepend path to nuget in repo (#18005)
This PR makes it so the path to nuget in this repo is prepended. This
will make it so the local `nuget.exe` is prioritised before looking for
nuget in `PATH`.

## Validation Steps Performed

Run `razzle.cmd`, the local instance of nuget is utilised. 

Delete `nuget.exe`, `razzle.cmd` uses `nuget.exe` specificed in the
`PATH`.

Closes #1111
2024-11-14 12:56:41 -08:00
Dustin L. Howett
00ff803ace
wsl: skip distributions that indicate they are "Modern" (#18183) 2024-11-13 16:12:47 -06:00
Mike Griese
772f546ac4
Add support for markdown -> XAML parsing (#17585)
This adds support to the Terminal for parsing Markdown to XAML. We're
using https://github.com/github/cmark-gfm as our parser, so that we can
support the fullness of github-flavored markdown.

The parser parses the markdown to produce a `RichTextBlock`, which
covers just about all the scenarios we need. Since we're initially just
targeting using this for "Release notes", I didn't implement
_everything_ in markdown[^1]. But headers, bold & italic, unordered
lists, images, links, code spans & blocks - all that works. We can work
on additional elements as we need them. The parser is encapsulated into
`Microsoft.Terminal.UI.Markdown.dll`, so that we won't load it on
startup, only when the pane is actually made the first time.

To test this out, I've added a `MarkdownPaneContent` pane type on
`x-markdown` (the `x-` is "experimental"). Go ahead and add that with:

```json
{ "command": { "action": "splitPane", "type": "x-markdown" } }
```

That's got the ability to load arbitrary MD files and render them. I
wouldn't call that experience finished though[^2][^3](and it probably
won't be in 1.22 timeframe). However, it is an excellent testbed for
validating what we do and do not support.

We'll use the markdown parser Soon<sup>TM</sup> for the What's New
panes.

* Done in pursuit of displaying release notes in the Terminal.
* Doesn't quite close out #16495 
* Should make #8647 possible
* may help with #16484

[^1]: the most notable gap being "block quotes" with `>`. I don't think
I can draw a vertical line in a rich text block easily. Footnotes are
also missing, as well as tables.
[^2]: I say it's not finished because the aforementioned MD gaps. Also
the UX there is not polished at all.
[^3]: I don't believe we'll have time to polish out the pure markdown
pane for 1.22, but what the parser covers now is more than enough for
the release notes pane in time for 1.22
2024-11-12 10:18:11 -08:00
Windows Console Service Bot
52262b05fa
Localization Updates - main - 11/01/2024 03:05:38 (#18135) 2024-11-06 00:25:21 +01:00
Jvr
8c016d3ea2
Update actions/add-to-project 1.0.1 -> 1.0.2 (#18052)
- build(deps-dev): bump braces from 3.0.2 to 3.0.3 
- build(deps-dev): bump @types/node from 16.18.96 to 16.18.101
- build(deps-dev): bump ts-jest from 29.1.2 to 29.1.5
- build(deps-dev): bump @typescript-eslint/parser from 7.6.0 to 7.14.1 
- build(deps-dev): bump @typescript-eslint/eslint-plugin from 7.6.0 to
7.14.1
- build(deps-dev): bump eslint-plugin-jest from 27.9.0 to 28.6.0 
- Dependabot/npm and yarn/eslint plugin jest 28.6.0 fixes
2024-11-04 17:17:36 -06:00
Carlos Zamora
72df7ac20e
Fix tab contrast colors when in high contrast (#18109)
Originally, the XAML resources were being applied on the TabView's
ResourceDictionary directly. However, high contrast mode has a few weird
scenarios as it basically reduces the color palette to just a few colors
to ensure high contrast. This PR now stores the resources onto the
ThemeDictionaries so that we have more control over the colors used.

## References and Relevant Issues
Closes #17913
Closes #13067

## Validation Steps Performed
Compared the following scenarios to WinUI 2 gallery's TabView when in
High Contrast mode:
 (Un)selected tab
 hover over x of (un)selected tab
 hover over unselected tab
2024-11-04 16:51:20 -06:00
Carlos Zamora
d8089e903e
Add 'Move Tab' submenu to tab context menu (#18107)
## Summary of the Pull Request
Adds a "Move tab" submenu to the tab's context menu. This submenu includes "move tab to new window", "move left", and "move right".

The new "move left/right" items are disabled if the tab can't be moved in a certain direction.'

Closes #17900
2024-10-31 13:15:11 -07:00
Carlos Zamora
d04381ec05
Fix High Contrast mode in Settings UI (#18130)
"HighContrast" is not a possible requested theme. So `_UpdateBackgroundForMica()` would force the settings UI to be light or dark. To fix this, we just check if we're in high contrast mode and, if so, we don't bother setting the requested theme.
2024-10-31 12:08:42 -07:00
Carlos Zamora
e83434ff7e
Fix High Contrast mode in Command Palette (#18132)
Turns out that having the styles for the KeyChordText and ParsedCommandLineText be empty for high contrast mode caused the issue. Since we're already using theme resources for the colors, we automatically adjust properly to whatever the high contrast theme is (Thanks XAML!).

Bonus points:
- we didn't need the theme dictionaries anymore, so I just moved them to the ResourceDictionary directly
- ParsedCommandLineTextBlockStyle isn't used. So I removed it altogether.

Validated command palette with multiple high contrast themes. See PR thread for demo.

Closes #17914
2024-10-31 12:08:14 -07:00
Leonard Hecker
fa8273065f
New tokenization & integer parsing helpers (#17962)
Reading through our existing patterns for integer parsing, I noticed
that we'd be better off returning them as optionals.
This also allowed me to improve the implementation to support integers
all the way up to their absolute maximum/minimum.

Furthermore, I noticed that `prefix_split` was unsound:
If the last needle character was the last character in the remaining
text, the remaining text would be updated to an empty string view.
The caller would then have no idea if there's 1 more token left
or if the string is truly empty.
To solve this, this PR introduces an iterator class. This will allow
it to be used in our VT parser code.
2024-10-29 11:55:21 -07:00
Josh Johnson
5b63465798
Add icon override setting for newTabMenu entries (#18116)
## Summary of the Pull Request
This PR is to allow users to set a custom icon for entries in the new tab menu for "action" and "profile" type entries.

## References and Relevant Issues
This PR is in response to #18103 

## Detailed Description of the Pull Request / Additional comments
It is now possible to specify an optional "icon" setting for any "action" or "profile" type entry in the "newTabMenu" JSON settings. When specified, this icon will be used as the menu icon for that action/profile in the new tab menu. If not specified, the action/profile definition's default icon will be used instead (if present).

The Cascadia settings schema ("doc/cascadia/profiles.schema.json") has been updated to reflect this.

## Validation Steps Performed
Manually tested with multiple combinations of icon settings:
- ActionEntry:
  - valid path in action definition and new tab entry (renders new tab entry icon)
  - valid path in action definition but no path in new tab entry (renders action definition icon)
  - no path in action definition, valid path in new tab entry (renders new tab entry icon)
  - invalid path in action definition, valid path in new tab entry (renders new tab entry icon)
  - valid path in action definition, invalid path in new tab entry (renders no icon)
  - invalid path in both (renders no icon)
  - no path in both (renders no icon)
- ProfileEntry:
  - valid path in new tab entry (renders new tab entry icon)
  - no path in new tab entry (renders profile's default icon)
  - invalid path in new tab entry (renders no icon)

## PR Checklist
- [x] Closes #18103
- [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: [#808](https://github.com/MicrosoftDocs/terminal/pull/808)
- [x] Schema updated (if necessary)
2024-10-29 11:45:19 -07:00
Leonard Hecker
8d3f12b1c0
Stop updating AutoSuggestBox on selection redux (#18010)
I wrote a big comment next to the changes I made.
This is a redo of #17961 which had various issues.

Closes #17916
Closes #18070 

## Validation Steps Performed
* Pressing Enter within the input line doesn't crash 
* Type "Cour" and pick Courier New, press Save = Saved 
* Pick any other font from the dropdown, press Save = Saved 
* Picking an option dismisses focus but not to the tab row 
* The first time after launching the SUI, when the setting is still
  unmodified, when you focus the box and pick an option,
  it'll unfocus the box 
* When the setting is unmodified, and you pick the default
  (Cascadia Mono), it'll still unfocus the box 
2024-10-23 17:20:30 -05:00
Windows Console Service Bot
b58aa26e7a
Localization Updates - 10/22/2024 03:06:53 (#18031)
Closes #17752
2024-10-22 14:33:06 -07:00
Dustin L. Howett
18098eca42
Update the bug templates to include type, convert Feature to yaml (#18018) 2024-10-21 09:40:52 -05:00
Leonard Hecker
3a06826915
Add a policy for profile sources (#18009)
This adds a basic policy check for DisabledProfileSources, so that
organizations can easily disable certain profiles like the Azure one.

Closes #17964

## Validation Steps Performed
* Add a policy to disable Azure under HKCU. Disabled 
* Add a policy to disable nothing under HKLM. Enabled 
  (...because it overrides the HKCU setting.)
2024-10-15 16:48:09 -05:00
Dustin L. Howett
990ed187d6
ci: fix the code formatting job (#18059)
We started requiring PowerShell 7+ in #18021

We did not update the code formatting task.
2024-10-15 11:58:51 -05:00
Michael Xu
494bc5bd3f
Ensure OpenConsole.psm1 requires PowerShell 7 (#18021)
Closes #17505
2024-10-10 21:27:34 -05:00
Carlos Zamora
36f064cfc8
Fix hiding the icon when it's set to "none" (#18030)
The settings UI and settings model allow you to set the icon to "none"
to hide the icon (you can actually see this effect in the settings UI
when changing the value of the profile icon). However, during settings
validation, "none" is considered a file path, which is then failed to be
parsed, resulting in the icon being marked as invalid and immediately
clearing the value.

This PR fixes this issue by considering "none" to be an accepted value
during validation.

Related to #15843
Closes #17943

## Validation Steps Performed
When an icon is set to "none", ...
 no more warning
 the icon is hidden
2024-10-10 19:11:51 -05:00
Michael Xu
d0e94365d0
Focus tabs to the right-not left-when the active tab is closed (#18022)
Closes #17244
2024-10-11 00:08:03 +00:00
Carlos Zamora
18d86bca09
Add a Compatibility and Terminal page to the Settings UI (#17895)
## Summary of the Pull Request
Adds a global Compatibility page to the settings UI. This page exposes
several existing settings and introduces a few new settings:
- compatibility.allowHeadless
- compatibility.isolatedMode
- compatibility.textMeasurement
- debugFeatures

This also adds a Terminal subpage for profiles in the settings UI. This
page includes:
- suppressApplicationTitle
- compatibility.input.forceVT
- compatibility.allowDECRQCRA
- answerbackMessage

Several smaller changes were accomplished as a part of this PR:
- `experimental.input.forceVT` was renamed to
`compatibility.input.forceVT`
- introduced the `compatibility.allowDECRQCRA` setting
- updated the schema for these new settings and
`compatibility.allowHeadless` (which was missing)
- add `Feature_DebugModeUI` feature flag to control if debug features
should be shown in the SUI

Verified accessible via Accessibility Insights

A part of #10000
Closes #16672
2024-10-10 23:54:31 +00:00
Carlos Zamora
0b4d3d5f89
Add miscellaneous simple settings to the settings UI (#17923)
## Summary of the Pull Request
Adds the following settings to the settings UI:
- $profile.RainbowSuggestions
- $profile.CellWidth
- $global.SearchWebDefaultQueryUrl
- $global.EnableColorSelection
- $global.ShowAdminShield
- $global.EnableUnfocusedAcrylic

Additionally, the following settings have graduated from experimental 🎓:
- $profile.rightClickContextMenu

Part of #10000
2024-10-10 18:14:55 -05:00
Leonard Hecker
4386bf07fd
Avoid focus loops in ConPTY (#17829)
This fixes a lot of subtle issues:
* Avoid emitting another de-/iconify VT sequence when
  we encounter a (de)iconify VT sequence during parsing.
* Avoid emitting a de-/iconify VT sequence when
  a focus event is received on the signal pipe.
* Avoid emitting such sequences on startup.
* Avoid emitting multiple such sequences
  when rapidly un-/focusing the window.

It's also a minor cleanup, because the `GA_ROOTOWNER` is not security
relevant. It was added because there was concern that someone can just
spawn a ConPTY session, tell it that it's focused, and spawn a child
which is now focused. But why would someone do that, when the console
IOCTLs to do so are not just publicly available but also documented?

I also disabled the IME window.

## Validation Steps Performed
* First:
  ```cpp
  int main() {
      for (bool show = false;; show = !show) {
          printf(show ? "Show in 3s...\n" : "Hide in 3s...\n");
          Sleep(3000);
          ShowWindow(GetConsoleWindow(), show ? SW_SHOW : SW_HIDE);
      }
  }
  ```
* PowerShell 5's `Get-Credential` gains focus 
* `sleep 5; Get-Credential` and focus another app. WT should start
  blinking in the taskbar. Restore it. The popup has focus 
* Run `:hardcopy` in vim: Window is shown centered at (0,0) ✖️
  But that's okay because it does that already anyway 
* `Connect-AzAccount` doesn't crash PowerShell 
2024-10-08 11:37:33 -05:00
James Holderness
aa256ad5c9
Add support for the S8C1T/S7C1T escape sequences (#17945)
This PR adds support for the `S8C1T` and `S7C1T` commands, which enable
an application to choose whether the terminal should use C1 controls
when sending key sequences and query responses.

This also updates the `DOCS` command to set both the input and output
code pages. So when switched to ISO2022 mode, the C1 controls will be
transmitted as 8-bit, which is what legacy systems would be expecting.

## Detailed Description of the Pull Request / Additional comments

While adding the input code page support, I also reworked the way we
handle the code page reset in `RIS`. In the original implementation we
saved the active code page when the `DOCS` sequence was first used, and
that would become the default value for a reset.

With this PR I'm now saving the code pages whenever `SetConsoleCP` or
`SetConsoleOutputCP` is called, so those APIs now control what the
default values will be. This feels more consistent than the previous
approach. And this is how WSL sets its initial code page to UTF-8.

## Validation Steps Performed

I've added a couple of unit tests that check one of each applicable C1
control in the key sequences and query reports.

I also built myself a code page aware telnet client so I could log into
WSL in 8-bit mode, and confirmed that the C1 transmissions are working
as expected in vttest.

Closes #17931
Tests added/passed
2024-10-07 13:11:38 +00:00
Dustin L. Howett
b715008de3
Revert "Stop updating AutoSuggestBox on selection" (#17989)
Reverts microsoft/terminal#17961
Closes #17987 
Reopens #17916
2024-10-03 17:24:38 +02:00
Windows Console Service Bot
9278873d76
Localization Updates - main - 09/27/2024 03:04:44 (#17966) 2024-10-01 16:48:54 -05:00
Windows Console Service Bot
59dc5eff42
Localization Updates - main - 09/26/2024 19:14:21 (#17958)
Closes #17752
Closes #17764
Closes #17830
2024-09-26 14:22:05 -05:00
Leonard Hecker
bcac9993cb
Stop updating AutoSuggestBox on selection (#17961)
`AutoSuggestBox` has a `SuggestionChosen` event and any reasonable
person would assume that this means one of the items was chosen.
But with WinUI it's raised whenever a suggestion is merely highlighted.
`QuerySubmitted` is the right event instead. Clearly that naming is
a lot better than `SuggestionChosen`, since the property to get the
chosen item is called `ChosenSuggestion`.
WinUI, like the unrelenting wilderness of a world indifferent to human
suffering, stands as a testament to the futility of human aspiration.

Closes #17916

## Validation Steps Performed
* Type "Casc"
* Move up/down with the arrow keys
* Neither the filtered list nor the text updates 
* Press Enter on an item
* Text updates 
2024-09-26 10:06:01 -05:00
Leonard Hecker
a8e0b9ccf6
Fix an exception on startup (#17960)
It bothered me. :)

## Validation Steps Performed
* Launch packaged WT. `IsPackaged() == true` 
* Launch unpackaged WT. `IsPackaged() == false` 
2024-09-25 10:49:40 -07:00
Carlos Zamora
37aba3157c
Add Warnings to Settings UI (#17933)
Adds the following settings to the Interaction page under a Warnings subsection:
- ConfirmCloseAllTabs
- InputServiceWarning
- WarnAboutLargePaste
- WarnAboutMultiLinePaste

This also changes the JSON keys of those settings to be in the `warning` namespace as a QOL change for JSON users. We still handle the legacy keys, don't worry 😉.

#10000
2024-09-25 10:10:24 -07:00
Carlos Zamora
0bd19e9cfc
Improve color contrast of reset button in SUI (#17912)
Adds a theme resource for the color of the reset button in the settings UI.

Closes #17902
2024-09-25 10:07:25 -07:00
Leonard Hecker
fc606d2bae
Add input scope startup setting (#17953)
This adds a "defaultInputScope" setting, hooks it up to our TSF,
and exposes it as a setting in the UI under the startup page.
In order to stay close with the other language setting, I moved that
one from the appearance to the startup page as well.
20 out of the 26 files in this PR are boilerplate unfortunately.

Closes #17816

## Validation Steps Performed
* Install and use the Chinese IME
* Launch WT
* Chinese input 
* Change setting to `alphanumericHalfWidth`
* Restart WT
* English input 
2024-09-24 16:14:31 -05:00
Leonard Hecker
4259ce535f
Fix clear buffer command (#17884)
Without a VT "renderer" there's no implicit output anymore when
calling `ClearPseudoConsole`. The fix is trivial, but it works
slightly different from before: Previously, we would preserve
the line the cursor is on, while this PR doesn't do that.
I felt like there's not much merit in preserving the line,
because it may be a multi-line prompt which won't work with that.

Closes #17867

## Validation Steps Performed
Bind 3 different actions to the 3 variants of "Clear buffer"
and test them. They work. 
2024-09-24 14:11:27 -05:00
Leonard Hecker
d9131c6889
Stop scrolling on output when search is open (#17885)
* Don't reset the position entirely when changing the needle
* Don't change the scroll position when output arrives
* Don't interfere with the search when output arrives constantly

Closes #17301

## Validation Steps Performed
* In pwsh, run `10000..20000 | % { sleep 0.25; $_ }`
  * You can search for e.g. `1004` and it'll find 10 results. 
  * You can scroll up and down past it and it won't snap back
    when new output arrives. 
* `while ($true) { Write-Host -NoNewline "`e[Ha"; sleep 0.0001; }`
  * You can cycle between the hits effortlessly.  (This tests that
    the constantly reset `OutputIdle` event won't interfere.)
* On input change, the focused result is near the previous one. 
2024-09-24 14:06:36 -05:00