Compare commits

...

123 Commits

Author SHA1 Message Date
Dustin L. Howett
ad93566c08 Rewrite the OSC color table functions 2024-11-22 21:35:56 -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
Leonard Hecker
0ce654eaf6 Fix a cooked read deadlock (#17905)
Because `_layoutLine` would never return `column == columnLimit` for
control character visualizers, we'd get a deadlock in `_redisplay`,
as it tries to fill the line until it's full, but never achieve it.

Closes #17893

## Validation Steps Performed
* Press Ctrl-A to insert "^A"
* Press Home to get to the start of the prompt
* Press and hold "A" until the line wraps
* The line wraps and there's no deadlock 
2024-09-24 14:06:01 -05:00
James Holderness
fc586e2662 Fix a sixel crash when the buffer is reflowed (#17951)
## Summary of the Pull Request

The sixel parser has an internal buffer that holds the indexed-color
representation of the image, prior to it being translated to RGB. This
buffer only retains the section of the image that is within the visible
viewport, so we're continually erasing segments from the top of it when
the image is large enough to trigger a scroll.

But there is a problem that arises if the window or font is resized so
that the buffer needs to reflow, because that can result in the image
being pushed entirely offscreen. At that point the segment we're trying
to erase is actually larger than the buffer itself, which can end up
causing the terminal to crash

To fix this, we just need to check for an oversized erase attempt and
simply clear the buffer instead.

## Validation Steps Performed

I could easily reproduce this crash in Windows Terminal by resizing the
font while viewing an animated gif with img2sixel. With this PR applied
the crash no longer occurs.

## PR Checklist
- [x] Closes #17947
2024-09-24 14:04:28 -05:00
Leonard Hecker
b520da26d4 Check EnableHexNumpad before enabling it (#17954)
This just adds a quick registry check for `EnableHexNumpad`.

Depends on #17774
Closes #17762 (again)

## Validation Steps Performed
* Alt + NumpadAdd + 221E doesn't do anything 
* Set the `EnableHexNumpad` registry key
* Restart
* Alt + NumpadAdd + 221E inserts ∞ 
2024-09-24 13:56:30 -05:00
Carlos Zamora
a7e47b711a Fix text scaling issues in settings UI (#17910)
## Summary of the Pull Request
Fixes some issues with truncated text in the settings UI when 200% text
scaling is applied.

For #17897, a minimum height was applied instead of a plain "height".
This ensures that the desired height is applied in general, but under
200% text scaling, we are allowed to grow past that, thus preventing the
truncation of the text.

For #17898, flyouts have a scroll viewer inside them by default. We
actually don't want the scroll viewer because that means the text will
appear "truncated" when in reality, the user is expected to notice the
small scrollbar and scroll horizontally (why that's the default, I will
never know). This PR introduces a new style that can be applied to these
flyouts to cause text wrapping instead of horizontal scrolling. Looked
through the app for any instances where this happens.

For #12006, simply changing the column width from a static value to
"auto" fixes the issue. Frankly, we care more about the text appearing
as a whole (and as whole words). The name of the actions wrap properly
anyways.

Closes #17897
Closes #17898
Closes #12006
2024-09-17 19:45:59 +02:00
Dustin L. Howett
2c97c0555d build: fix the TSA configuration (#17929)
We are, quite literally, shipping the org chart.
2024-09-17 10:30:59 -05:00
James Holderness
5e8e10fdc0 Add support for resetting the color scheme with RIS (#17879)
## Summary of the Pull Request

This improves our `RIS` (hard reset) implementation, so it now also
resets any changes that are made to the color table and color aliases,
which is one of the things it's supposed to be doing.

## References and Relevant Issues

This is also a small step towards implementing the `OSC` sequences that
reset individual color table entries (issue #3719).

## Detailed Description of the Pull Request / Additional comments

The way this works is by having a second copy of the color table and
alias indices to hold the default values in the `RenderSettings` class.
This default set is initially populated at startup with the user's
chosen color scheme, but can also potentially be updated if the user
changes their settings while a session is already in progress.

When we receive an `RIS` request, we just copy the default values back
over the active settings, and refresh the renderer.

## Validation Steps Performed

I've manually tested both OpenConsole and Windows Terminal by changing
my color scheme programmatically, and then confirming that the original
colors are restored when an `RIS` sequence is received.

I've also added some basic unit tests that check both the color aliases
and color table are restored by `RIS`.

## PR Checklist
- [x] Tests added/passed
2024-09-16 13:59:12 -05:00
Leonard Hecker
bc6f3e2275 Fix a crash on pane close (#17886)
The underlying issue is that the "Pane" is used both as a model and as
a UI element and so a pane loses its content as soon as it is closed,
but the tree only gets reordered after the animation has finished.
This PR is truly just a hotfix, because it doesn't solve this issue,
it only adds checks to the function that crashes.

Closes #17869
Closes #17871

## Validation Steps Performed
* `Split pane` a few times
* Run the "Close all other panes" action
* Doesn't crash 
2024-09-12 10:03:39 -05:00
Carlos Zamora
6196a3d0f7 Add Feature_QuickFix to preview builds (#17888) 2024-09-11 08:34:11 -07:00
Dustin L. Howett
4aa1624cd2 Remove PackageES in favor of our own versioning package (#17872)
PackageES is deprecated by known scourge-on-earth OneBranch, and is now
the cause of some non-compliance.

I got permission from them to open-source it, so that's coming next.

For now, we can just depend on a package based on our code based on
theirs.

Tested and working for C++ (DLL, EXE), C#, NuGet and MSIX.
2024-09-10 01:37:25 +02:00
Mike Griese
c699a468c9 Add Feature_SaveSnippet to preview builds (#17881)
whoops. This should have been in preview after I sorted out #17366


----

I did this one on GH so let's hope CI works
2024-09-10 01:37:12 +02:00
Kacper Michajłow
0576e5bc1e Allow closing tabs with middle mouse button when close button is hidden (#15924)
## Summary of the Pull Request
This commit fixes the middle mouse button handler. The `PointerReleased` callback is registered, but it is not operational because, on the Release event, the mouse button is no longer pressed. We need to track its state and act accordingly.

Issue was introduced by commit 05e7ea1423, which changed the event handler from `PointerPressed` to `PointerReleased`, rendering it inoperative. Instead, the default handler is used. The main issue is that when the close button is hidden with the `showCloseButton` option, the default handler no longer closes the tab on middle mouse clicks.

Also made it consistent with the Settings tab, which was never converted to `PointerReleased` and is still handled with a custom handler.

## References and Relevant Issues
Related commit 05e7ea1423

## Validation Steps Performed
I've been using this commit locally for quite some time, figured out I might as well share it.
2024-09-09 14:08:25 -07:00
Nihat Uygar Köseer
544452dad4 Add tab color indicator for tab switch menu (CTRL+Tab) (#17820)
Added tab color indicator for the tab switch menu. Tab color indicators
have the same color as the background color of the tabs. If a tab has
the default background color, the indicator is not shown in the tab
switch menu.

Closes #17465
2024-09-06 10:21:40 -05:00
Leonard Hecker
00f46e400a Fix crash in AppHost::_QuitRequested (#17848) 2024-09-06 10:19:03 -05:00
Leonard Hecker
4eb06fee07 Restore contents when a screen info is closed (#17853) 2024-09-06 10:18:51 -05:00
Leonard Hecker
d2c3cfd164 Fix ScrollRect to DECCRA translation (#17849)
By translating the clip rectangle into a source-relative coordinate
space we can calculate the intersection that must be copied
much much more easily. I should've done that from the start.

Closes #17801

## Validation Steps Performed
* Test code provided in #17801
2024-09-04 16:06:36 -07:00
Leonard Hecker
5fdfd51209 Dedup command history by default (#17852)
Under ConPTY we don't load any user settings. `SetUpConsole` notes:
> If we are [ConPTY], we don't want to load any user settings,
> because that could result in some strange rendering results [...]

This enables deduplication by default, which I figured wouldn't cause
any regressions since it's a user-controllable setting anyway, while
it's clearly something the average user wants enabled, for the same
reason that PSReadLine has HistoryNoDuplicates enabled by default.

Closes #17797

## Validation Steps Performed
* Launch conhost, enter 2 commands, press F7, select the older one,
  press Enter, press F7. 2 entries 
* Launch WT, enter 2 commands, press F7, select the older one,
  press Enter, press F7. 2 entries 
2024-09-04 12:57:23 -07:00
Leonard Hecker
7b50f12a78 Avoid dropping Esc characters from VT responses (#17833)
`GetChar` checks if the vkey is VK_ESCAPE. `CharToKeyEvents` however
tries really hard to figure out the vkeys of all characters.
To avoid these issues all we need to do is to simply use the existing
`WriteString` function we already use for all other VT responses.
If it's good for conhost responses, it's good for ConPTY responses.

Additionally, this removes another `IsVtInputEnabled` which was
redundant with `WriteString` which worked exactly the same internally.

Closes #17813
Closes #17851
Probably also related to #17823

## Validation Steps Performed
* Wrote a small app to send and receive a DA1 request. It works 
* WSL already worked to begin with (and still works now) 
* No double-encoding of mouse input events 
2024-09-04 15:47:01 +02:00
James Holderness
6e5827add5 Pass through DCS responses when VT input mode is disabled (#17845)
## Summary of the Pull Request

When an app makes a VT request that returns a `DCS` response, and it
hasn't also enabled VT input mode, the new passthrough implementation
loses that response. All the app receives is an `Alt`+`\` key press
triggered by the `ST` terminator. This PR fixes that issue.

## References and Relevant Issues

This is one of the unresolved issues tracked in #17643.

## Detailed Description of the Pull Request / Additional comments

The way `DCS` sequences are handled in the input state machine engine is
by returning a nullptr from `ActionDcsDispatch`, which tells the state
machine to ignore that content. But the sequence is still buffered, and
when the `ST` terminator is eventually received, that buffer is flushed,
which passes the whole thing through to the app.

Originally this only worked when VT input mode was enabled, otherwise
the `ST` sequence is converted into a key press, and the buffered `DCS`
content is lost. The way it works now is we set a flag when the `DCS`
introducer is received, and if that flag is set when the `ST` arrives,
we know to trigger a flush rather a key press.

## Validation Steps Performed

I've tested a `DA3` request from the cmd shell (i.e. `echo ^[[=c`), and
confirmed that now works as expected. I've also hacked Windows Terminal
to disable win32-input mode, so I could check how it works with conpty
clients generating standard VT input, and confirmed that an `Alt`+`\`
keypress is still translated correctly.
2024-09-04 13:36:32 +00:00
Mike Griese
17a55da0f9 Fix two ConPTY HWND focus issues (#17828)
Worked with @ekoschik on this one. 

## Bug the first: the MSAL window `ixptools` spawns

> The auth prompt in pwsh.exe is disabling the terminal window while its
opened and re-enabling it when the window closes. BUT it is enabling
Terminal after dismissing itself, instead of before, which means
terminal is disabled when activated.
> 
> Terminal wants focus on the ISLAND window (a grandchild; island is
parented to bridge, which is parented to terminal’s TLW). When it is
activated, it gets a `WM_SETFOCUS` (in response to DefWindowProc
`WM_ACTIVATE`). From `WM_SETFOCUS` it calls `SetFocus` on the bridge
window, and similarly the bridge calls `SetFocus` on the island.
> 
> If the TLW is disabled, these `SetFocus` calls fail (see [this
check](#internal-link-redacted) in `SetFocus`). In the case above, this
leaves Terminal’s TLW as focus, and it doesn’t handle keyboard input.
Note that the window IS foreground/active, but because focus is not on
the island it doesn’t see the keyboard input. Another thing to note is
that clicking on the space to the right of the tabs does NOT revive
keyboard input, but clicking on the tabs or main area does.

> **I recommend having the TLW handle WM_ENABLE and call SetFocus on the
island window.**

And guess what, that works!

## Bug the second: When sublime text is the git `EDITOR`, it doesn't
toss focus back to the Terminal


> In this case, Sublime is calling SFW on the pseudo console window. I
don’t have its code, but it is presumably doing something like
SetForegroundWindow(GetConsoleWindow()). This queues an event to the
pseudo window, and when that event is processed the pseudo window
becomes the active and focus window on the queue (which is shared with
Terminal).
> 
> The sublime window dismisses itself and does the above SFW call.
Dismissing immediately activates the Terminal TLW, which does the
triple-focus dance (TLW sets focus on itself, then bridge, then island).
This completes but is overwritten immediately when the pseudo window
activates itself. Note that the pseudo window is active at this point
(not the terminal window).

> **I recommend having the Pseudo console window handle WM_ACTIVATE by
calling SetFocus on the island window (and not passing the message to
DefWindowProc).**

And guess what, that works!


----

Closes #15956 (I did test this)
This might be related to #13388, we'll have folks try canary and check
2024-08-29 21:19:15 +00:00
Leonard Hecker
0cb3426281 Give spacing marks space (#17826)
Spacing marks are called so, because they have a positive advance
width, unlike their non-spacing neighbors (as the name indicates).
After this we stop assigning such gc=Mc codepoints a zero width.

Closes #17810
2024-08-29 15:27:24 -05:00
PankajBhojwani
1482fd4ecd Add action IDs to the color selection commands (#17821)
## Summary of the Pull Request
Add action IDs to the default commands for color selection

## Validation Steps Performed
Color selection commands now show up in the command palette

## PR Checklist
- [x] Closes #17819
- [ ] Tests added/passed
- [ ] Documentation updated
- If checked, please file a pull request on [our docs
repo](https://github.com/MicrosoftDocs/terminal) and link it here: #xxx
- [ ] Schema updated (if necessary)
2024-08-29 15:08:28 -05:00
Nihat Uygar Köseer
837215b206 Handle window resize event (CSI t, resize) (#17721)
`ResizeWindow` event in `TerminalApi` is handled and bubbled to
`TerminalApi->ControlCore->TermControl->TerminalPage->AppHost`. Resizing
is accepted only if the window is not in fullscreen or quake mode, and
has 1 tab and pane.

Relevant issues: #5094
2024-08-29 13:43:50 -05:00
Carlos Zamora
93d592bb41 Remove unnecessary FMT (#17795)
There's an unnecessary `fmt::format` here caught in the code review: https://github.com/microsoft/terminal/pull/17678#discussion_r1729426705

This simply removes it.
2024-08-26 14:38:11 -07:00
Leonard Hecker
760daa642e Modernize VtPipeTerm (#17647)
This shortens VtPipeTerm quite a bit, which used to have various debug
flags and modes. I kept the `--out` flag to redirect the output to a
file, but I removed the `--debug` (pipe the output through WSL and
show escape sequences visually) and `--headless` (hide conpty) flags.

I did this, because VtPipeTerm always used the system ConPTY API
but I needed it to use my local OpenConsole. I also wanted it to
use overlapped IO for testing but found that it was too difficult
to refactor make that work.

I also noticed that the project was the only holdout for
`conpty.h` which had to be kept in sync with `winconpty.h`.
2024-08-26 21:06:43 +02:00
James Holderness
1f71568c2a Make sure a blank title string resets the title (#17802)
## Summary of the Pull Request

When a VT title sequence sets the title to a blank string, that is meant
to trigger a reset to the default starting value. This used to work in
the past because the blank value was dealt with by conhost, so Windows
Terminal never received a blank title, but that's no longer the case
with the new VT passthrough. This PR fixes the issue by getting Windows
Terminal to handle the blank title strings itself. 

## References and Relevant Issues

VT passthrough was introduced in PR #17510.

## Validation Steps Performed

I've manually verified that the `OSC 0`, `OSC 2`, and `DECSWT` sequences
now correctly reset the title when passed a blank title string. 

## PR Checklist
- [x] Closes #17800
2024-08-26 14:02:39 +02:00
Dustin L. Howett
f93347ed4b version: bump to 1.23 on main 2024-08-23 15:10:12 -05:00
Leonard Hecker
040f26175f Use DECCRA/DECFRA for ScrollConsoleScreenBuffer (#17747)
This adds logic to get the DA1 report from the hosting terminal on
startup. We then use the information to figure out if it supports
rectangular area operations. If so, we can use DECCRA/DECFRA to
implement ScrollConsoleScreenBuffer.

This additionally changes `ScrollConsoleScreenBuffer` to always
forbid control characters as the fill character, even in conhost
(via `VtIo::SanitizeUCS2`). My hope is that this makes the API
more consistent and robust as it avoids another source for
invisible control characters in the text buffer.

Part of #17643

## Validation Steps Performed
* New tests 
2024-08-23 22:02:01 +02:00
Windows Console Service Bot
0a91023df8 Localization Updates - main - 08/22/2024 03:06:16 (#17767) 2024-08-23 12:30:13 -07:00
Carlos Zamora
0a9cbd09d8 Track and log changes to settings (#17678)
Adds functionality throughout the settings model to keep track of which
settings have been set.

There are two entry points:
- AppLogic.cpp: this is where we perform a settings reload by loading
the JSON
- MainPage.cpp: this is where the Save button is clicked in the settings
UI

Both of these entry points call into
`CascadiaSettings::LogSettingChanges()` where we aggregate the list of
changes (specifically, _which_ settings changed, not _what_ their value
is).

Just about all of the settings model objects now have a
`LogSettingChanges(std::set& changes, std::string_view context)` on
them.
- `changes` is where we aggregate all of the changes to. In it being a
set, we don't need to worry about duplicates and can do things like
iterate across all of the profiles.
- `context` prepends a string to the setting. This'll allow us to better
identify where a setting was changes (i.e. "global.X" are global
settings). We also use this to distinguish between settings set in the
~base layer~ profile defaults vs individual profiles.

The change log in each object is modified via two ways:
- `LayerJson()` changes: this is useful for detecting JSON changes! All
we're doing is checking if the setting has a value (due to inheritance,
just about everything is an optional here!). If the value is set, we add
the json key to the change log
- `INHERITABLE_SETTING_WITH_LOGGING` in IInheritable.h: we already use
this macro to define getters and setters. This new macro updates the
setter to check if the value was set to something different. If so, log
it!

 Other notes:
- We're not distinguishing between `defaultAppearance` and
`unfocusedAppearance`
- We are distinguishing between `profileDefaults` and `profile` (any
other profile)
- New Tab Menu Customization:
- we really just care about the entry types. Handled in
`GlobalAppSettings`
- Font:
- We still have support for legacy values here. We still want to track
them, but just use the modern keys.
- `Theme`:
- We don't do inheritance here, so we have to approach it differently.
During the JSON load, we log each setting. However, we don't have
`LayerJson`! So instead, do the work in `CascadiaSettings` and store the
changes there. Note that we don't track any changes made via setters.
This is fine for now since themes aren't even in the settings UI, so we
wouldn't get much use out of it anyways.
- Actions:
- Actions are weird because we can have nested and iterable actions too,
but `ActionsAndArgs` as a whole add a ton of functionality. I handled it
over in `Command::LogSettingChanges` and we generally just serialize it
to JSON to get the keys. It's a lot easier than dealing with the object
model.

Epic: #10000
Auto-Save (ish): #12424
2024-08-23 12:28:19 -07:00
Mike Griese
cd8c12586b Clip the "current commandline" at the cursor position (#17781)
This is particularly relevant to pwsh with the "ghost text" enabled. In
that scenario, pwsh writes out the predicted command to the right of the
cursor. With `showSuggestions(useCommandline=true)`, we'd auto-include
that text in the filter, and that was effectively useless.

This instead defaults us to not use anything to the right of the cursor
(inclusive) for what we consider "the current commandline"

closes #17772
2024-08-23 12:24:34 -07:00
Mike Griese
ef960558b3 A trio of snippets pane fixes (#17794)
1. Don't crash on a cmdpal "duplicate pane" of a snippets pane
   * Found while trying to solve bug the third. 
* "Duplicate pane" with a snippets pane would crash. This was due to us
attempting to `PreviewText` when there was no buffer yet.
(`_activeBuffer()` strikes again)
2. dismiss the preview from cmdpal correctly too
   * Again while looking for part the third, I hit this
* I have a `sendInput(input: "a")` command. This is the first command in
the palette. And opening a new pane would... preview that command in the
new pane? weird. Moving the line in `CommandPalette::_close` fixes this
3. Don't crash when we're restoring a snippets pane and there's a bunch
of windows
   * This was the real bug I was trying to fix
* Looks like if you have enough panes & windows, there's enough of a
delay between ctoring a snippets pane and actually calling
`_UpdateSettings` on it, that the XAML loads and tries to bind to
`_allTasks`, which _hadn't been constructed yet_
   * closes #17793
2024-08-23 12:21:44 -07:00
Leonard Hecker
47d9a87a23 Make fire_and_forget exception safe (#17783)
This PR clones `winrt::fire_and_forget` and replaces the uncaught
exception handler with one that logs instead of terminating.
My hope is that this removes one source of random crashes.

## Validation Steps Performed
I added a `THROW_HR` to `TermControl::UpdateControlSettings`
before and after the suspension point and ensured the application
won't crash anymore.
2024-08-23 12:19:42 -07:00
Leonard Hecker
b07589e7a8 Improve reliability of VT responses (#17786)
* Repurposes `_sendInputToConnection` to send output to the connection
  no matter whether the terminal is read-only or not.
  Now `SendInput` is the function responsible for the UI handling.
* Buffers responses in a VT string into a single string
  before sending it as a response all at once.

This reduces the chances for the UI thread to insert cursor positions
and similar into the input pipe, because we're not constantly unlocking
the terminal lock anymore for every response. The only way now that
unrelated inputs are inserted into the input pipe is because the VT
requests (e.g. DA1, DSR, etc.) are broken up across >1 reads.

This also fixes VT responses in read-only panes.

Closes #17775

## Validation Steps Performed
* Repeatedly run `echo ^[[c` in cmd.
  DA1 responses don't stack & always stay the same 
* Run nvim in WSL. Doesn't deadlock when pasting 1MB. 
* Run the repro from #17775, which requests a ton of OSC 4
  (color palette) responses. Jiggle the cursor on top of the window.
  Responses never get split up. 
2024-08-23 10:54:27 -07:00
Mike Griese
7d790c7c61 Prevent a crash when holding enter when creating a tab (#17788)
I guess I didn't realize that `SendCharEvent` could get called before `Create`. In that scenario, `enter` would hit the automark codepath (due to #17761), then crash because there was no text buffer.

Pretty easy to prevent.

Closes #17776
2024-08-23 10:49:11 -07:00
Mike Griese
9ec8584f86 Don't emit raw escape sequences in the test log output (#17790)
I used this very bad regex to try and find all the `\x1b`'s in ScreenBufferTests that weren't in a ProcessString call:
```
(?<!ProcessString.*)\x1b\[
```

And these looked like the ones that were the only violations. 

Closes #17736
2024-08-23 10:48:38 -07:00
Carlos Zamora
dbbc581154 Use WinGet API to improve Quick Fix results (#17614)
## Summary of the Pull Request
Improves Quick Fix's suggestions to use WinGet API and actually query
winget for packages based on the missing command.

To interact with the WinGet API, we need the
`Microsoft.WindowsPackageManager.ComInterop` NuGet package.
`Microsoft.WindowsPackageManager.ComInterop.Additional.targets` is used
to copy over the winmd into CascadiaPackage. The build variable
`TerminalWinGetInterop` is used to import the package properly.

`WindowsPackageManagerFactory` is used as a centralized way to generate
the winget objects. Long-term, we may need to do manual activation for
elevated sessions, which this class can easily be extended to support.
In the meantime, we'll just use the normal `winrt::create_instance` on
all sessions.

In `TerminalPage`, we conduct the search asynchronously when a missing
command was found. Search results are limited to 20 packages. We try to
retrieve packages with the following filters set, then fallback into the
next step:
1. `PackageMatchField::Command`,
`PackageFieldMatchOption::StartsWithCaseInsensitive`
2. `PackageMatchField::Name`,
`PackageFieldMatchOption::ContainsCaseInsensitive`
3. `PackageMatchField::Moniker`,
`PackageFieldMatchOption::ContainsCaseInsensitive`

This aligns with the Microsoft.WinGet.CommandNotFound PowerShell module
([link to relevant
code](9bc83617b9/src/WinGetCommandNotFoundFeedbackPredictor.cs (L165-L202))).

Closes #17378
Closes #17631
Support for elevated sessions tracked in #17677

## References
-
https://github.com/microsoft/winget-cli/blob/master/src/Microsoft.Management.Deployment/PackageManager.idl:
winget object documentation

## Validation Steps Performed
- [X] unelevated sessions --> winget query performed and presented
- [X] elevated sessions --> nothing happens (got rid of `winget install
{}` suggestion)
2024-08-23 19:20:29 +02:00
Mike Griese
1de142b4b1 Dismiss the snippet preview when there is no suggestions (#17777)
Pretty obvious in retrospect. If there's no results, then we need to
preview
_nothing_ to make sure that we clear out any old previews.

Closes #17773


Additionally, while I was here:

I realized why it seems like the selected item is so wacky when you
first open the sxnui:
* on launch we're not scrolling to the bottom item (which makes it
awkward in bottom up mode)
* when we filter the list, we're maintaining the selection _index_, not
the selection _item_.

Alas, that second part is... shockingly bodgy.
2024-08-23 10:12:00 -07:00
Dustin L. Howett
d1a1f9836e Restore off-the-top behavior for VT mouse mode (#17779)
PR #10642 and #11290 introduced an adjustment for the cursor position
used to generate VT mouse mode events.

One of the decisions made in those PRs was to only send coordinates
where Y was >= 0, so if you were off the top of the screen you wouldn't
get any events. However, terminal emulators are expected to send
_clamped_ events when the mouse is off the screen. This decision broke
clamping Y to 0 when the mouse was above the screen.

The other decision was to only adjust the Y coordinate if the core's
`ScrollOffset` was greater than 0. It turns out that `ScrollOffset` _is
0_ when you are scrolled all the way back in teh buffer. With this
check, we would clamp coordinates properly _until the top line of the
scrollback was visible_, at which point we would send those coordinates
over directly. This resulted in the same weird behavior as observed in
#10190.

I've fixed both of those things. Core is expected to receive negative
coordinates and clamp them to the viewport. ScrollOffset should never be
below 0, as it refers to the top visible buffer line.

In addition to that, #17744 uncovered that we were allowing
autoscrolling to happen even when VT mouse events were being generated.
I added a way for `ControlInteractivity` to halt further event
processing. It's crude.

Refs #10190
Closes #17744
2024-08-23 16:43:39 +00:00
Dustin L. Howett
e006f75f6c During Alt+Numpad composition, stash keys in case we bail out (#17774)
We were erroneously eating Alt followed by VK_ADD. This change makes
sure we cache key presses and releases that happen once a numpad
composition is active so that we can send them when you release Alt.

Right now, we only send them when you release Alt after composing Alt
and VK_ADD (entering hex mode) and only if you haven't inserted an
actual hex numpad code. This does mean that `Alt VK_ADD 0 0 H I` will
result in an input of "+hi". That... seems like a small price to pay for
Alt VK_ADD working again.

Closes #17762
2024-08-23 10:13:50 -05:00
Leonard Hecker
6dd9c468eb ConPTY: Flush unhandled sequences to the buffer (#17741)
#17510 made it so that VT requests like DA1 are passed through to the
hosting terminal and so conhost stopped responding to them on its own.
But since our input parser doesn't support proper passthrough (yet),
it swallowed the response coming from the terminal.

To solve this issue, this PR repurposes the existing boolean return
values to indicate to the parser whether the current sequence should
be flushed to the dispatcher as-is. The output parser always returns
true (success) and leaves its pass-through handler empty, while the
input parser returns false for sequences it doesn't expect.

## Validation Steps Performed
* Launch cmd
* Press `Ctrl+[`, `[`, `c`, `Enter` (= `^[[c` = DA1 request)
* DA1 response is visible 
2024-08-22 15:52:09 -07:00
Dustin L. Howett
cbb4a0a01c Allow OSC 17 to set the selection background color (#17742)
This pull request adds support for setting and querying the selection
color with `OSC 17`.

To make this possible, I had to move selection color down into the color
table where it always belonged. This lets us get rid of the special
`SetSelectionColor` method from the surface of AtlasEngine, and reunites
selection colors with the rest of the special colors.
2024-08-22 12:58:11 -05:00
Dustin L. Howett
eabebc4cb2 Guard Control UpdateAppearance/Settings against UAF (#17770)
When you close a window, it naturally loses focus.

We were trying to use members of the control to update its appearance on
focus loss after it got torn down.

Closes #17520
2024-08-22 10:55:49 -07:00
Leonard Hecker
b3f41626b4 ConPTY: Raise the MAX_PATH limit (#17768)
Swapped the `swprintf_s` with no failure checks against a
`str_printf_nothrow` with checks. I also deduplicated the
`CreateProcess` calls since they're mostly identical.

Closes #16860
2024-08-22 09:32:11 -07:00
Carlos Zamora
56cfb77c6d Log action dispatch occurrence (#17718)
Some simple logic to report whenever an action has successfully occurred
(and what ShortcutAction was used).

Note, there will be some false positives here from startup. I noticed we
get a `newTab` on launch. This is probably a result of restoring the
window layout of the previous session since we're using ActionAndArgs
for that.
2024-08-22 01:29:32 +02:00
Dustin L. Howett
628e99f5d2 Disable PGO for Release builds (#17765)
Same justification as #17749.

We will revert this when either OneBranch Custom Pools become
fit-for-purpose or they upgrade to VS 17.11. Or the heat death of the
universe.
2024-08-21 16:21:05 -07:00
Dustin L. Howett
3b4ee83ed1 Add support for querying Xterm dynamic colors and palette (#17729)
This pull request adds support for querying all of the "dynamic
resource" colors (foreground, background, cursor) as well as the entire
color palette using OSC 4, 10, 11 and 12 with the `?` color specifier.

To ease integration and to make it easier to extend later, I have
consolidated `SetDefaultForeground`, `SetDefaultBackground` and
`SetCursorColor` into one function `SetXtermColorResource`, plus its
analog `RequestXtermColorResource`.

Those functions will map xterm resource OSC numbers to color table
entries and optionally color _alias_ entries using a constant table. The
alias mappings are required to support reassigning the default
foreground and background to their indexed entries after a `DECAC`.

While there are only three real entries in the mapping table right now,
I have designs on bringing in selection background (xterm "highlight")
and foreground (xterm "highlightText").

We can also extend this to support resetting via OSC 110-119. However,
at the adapter layer we do not have the requisite information to restore
any of the colors (even the cursor color!) to the user's defaults.

`OSC 10` and `OSC 11` queries report the final values of
`DECAC`-reassigned entries, under the assumption that an application
asking for them wants to make a determination regardless of their
internal meaning to us (that is: they read through the aliased color to
its final destination in the color palette.)

I've tested this with lsix, which detects the background color before
generating sixel previews. It works great!

ConPTY does not currently pass OSC sequences received on the input
handle, so work was required to make it do so.

Closes #3718
2024-08-21 17:45:14 -05:00
PankajBhojwani
ce92b18507 Fix overwrite key binding warning in the SUI (#17763)
Fixes a regression from the actions MVVM change in #14292 - attempting
to overwrite a keybinding was displaying a warning but propagating the
change before the user acknowledged it.

The overwrite key binding warning in the SUI works like before

Closes #17754
2024-08-21 22:43:20 +00:00
Mike Griese
fd1b1c35b4 Set the default for autoMarkPrompts to true (#17761)
As we discussed in bug bash.

There's really no downside to us enabling it by default (and leaving
showMarksOnScrollbar: false). It'll mark lines as "prompts" when the
user hits enter. This will have a couple good side effects:
* When folks have right-aligned prompts (like, from oh-my-posh), the
`enter` will terminate where shell integration thinks the command is, so
that the right-prompt doesn't end up in the commandline history
* the scrollToMark actions will Just Work without any other shell
integration

Closes #17632
2024-08-21 17:07:06 -05:00
Mike Griese
5ff8b80358 x-save the commandline in the current window (#17758)
By manually setting the `_windowTarget` to `0`, we can make sure to toss
`x-save` commandlines at the current terminal window (so long as there
is one).

Edge cases:
* You passed other subcommands with `x-save`: Well, we'll do whatever we
would have normally done for multiple subcommands. We won't `x-save` in
the current window, we'll obey your settings. That seems to make sense
* You ran `wt x-save` without an open Terminal window: We'll open a
terminal window during the process of handling it. That seems sensible.

Closes #17366
2024-08-21 16:53:39 -05:00
Carlos Zamora
0a7c2585a2 Add ellipses back in to some command names (#17715)
In #16886, the key for the nested action got renamed from `Split
Pane...` to `Split pane`. This accidentally caused a collision because
now there's two actions with the same name! The settings model then
prefers the user's action over the one defined in defaults.json, thus
completely hiding the nested version.

I tried to balance the stylistic recommendations from #16846 (mainly
[this
comment](https://github.com/microsoft/terminal/issues/16846#issuecomment-2005007519)
since it gave some excellent examples) while trying to maintain muscle
memory as much as possible (with similar substring sequences). There was
also one case where we still used "the tab" so I removed the "the" for
consistency.

Side effect of #16886 which closed #16846
Closes #17294
Closes #17684
2024-08-21 20:13:39 +02:00
Leonard Hecker
a40a4ea094 ConPTY: Inject W32IM sequences (#17757)
Does what it says on the tin.

Part of #17737

## Validation Steps Performed
* In WSL run
  `printf "\e[?9001h"; sleep 1; printf "\e[?9001l"; read`
* Wait 1s and press Enter
* Run `showkey -a`
* Esc works 
2024-08-21 18:31:32 +02:00
Dustin L. Howett
1cb3445834 Force selection FG to black or white depending on BG luminance (#17753) 2024-08-21 07:50:04 -05:00
Dustin L. Howett
516ade54cb Port ServicingPipeline.ps1 to ProjectsV2 (#17756) 2024-08-21 07:49:36 -05:00
Leonard Hecker
056af83994 Fix pane event handlers being unbound (#17750)
I don't know what has changed between #17450 and now, but that fix
doesn't seem necessary anymore. If you add this action:
```json
{
    "keys": "ctrl+a",
    "command":
    {
        "action": "splitPane",
        "commandline": "cmd /c exit"
    }
}
```

and repeatedly spam Ctrl-A it used to lead to crashes. That doesn't
happen anymore, because some other PR must've fixed that.

Reverting #17450 fixes the issue found in #17578: Because the content
pointer didn't get reset to null anymore it meant that the root
pane retained the pointer after a split. After closing the split off
pane, it would assign the remaining one back to the root, which would
cause the still existing content pointer to be closed. That pointer
is potentially the same as the remaining pane and so no close events
would get received anymore.

Closes #17578

## Validation Steps Performed
* Add the above action and spam it 
* Start with an empty window, split pane, type `exit` in the new pane
  then type it in the original pane. It closes the window 
2024-08-21 14:44:42 +02:00
Carlos Zamora
7b39d24913 Fix UIA RangeFromPoint API (#17695)
## Summary of the Pull Request
Fixes the `RangeFromPoint` API such that we're now properly locking when
we attempt to retrieve the viewport data. This also corrects the
conversion from `UiaPoint` (screen position) to buffer coordinates
(buffer cell).

Closes #17579 

## Detailed Description of the Pull Request / Additional comments
- `UiaTextRangeBase::Initialize(UiaPoint)`:
- reordered logic to clamp to client area first, then begin conversion
to buffer coordinates
   - properly lock when retrieving the viewport data
- updated `_TranslatePointToScreen` and `_TranslatePointFromScreen` to
use `&` instead of `*`
   - we weren't properly updating the parameter before
- `TermControlUiaTextRange::_TranslatePointFromScreen()`
- `includeOffsets` was basically copied over from
`_TranslatePointToScreen`. The math itself was straight up wrong since
we had to do it backwards.

## Validation Steps Performed
 Moved WT to top-left of monitor, then used inspect.exe to call
`RangeFromPoint` API when mouse cursor is on top-left buffer cell (also
meticulously stepped through the two functions ensuring everything was
correct).
2024-08-20 15:58:05 -07:00
Leonard Hecker
249fe2aca1 Fix a crash when disabling the ASB (#17748)
`ProcessString` may delete the ASB and cause a dangling screen info
pointer. As such, we must avoid using the pointer after the call.

Closes #17709

## Validation Steps Performed
I couldn't repro the issue.
2024-08-20 21:58:54 +02:00
Dustin L. Howett
408f3e2bfd Disable PGO for nightly builds (#17749)
Refs #17699
2024-08-20 14:15:27 -05:00
Leonard Hecker
e0dae59f38 Fix a crash during settings update (#17751)
* Adds a check whether the thread dispatcher is already null.
  (See code comments.)
* Moves the `_settings` to only happen on the UI thread.
  Anything else wouldn't be thread safe.

Closes #17620

## Validation Steps Performed
Not reproducible. 🚫
2024-08-20 20:21:21 +02:00
Mike Griese
60ac45c239 Log when WindowsTerminal.exe starts (#17745)
as discussed in team sync
2024-08-20 10:18:42 -05:00
Leonard Hecker
b439925acc Fix session persistence when the session ends (#17714)
Once all applications that have received a `WM_ENDSESSION` message
have returned from processing said message, windows will terminate
all processes. This forces us to process the message synchronously.
This meant that this issue was timing dependent. If Windows Terminal
was quick at persisting buffers and you had some other application that
was slow to shut down (e.g. Steam), you would never see this issue.

Closes #17179
Closes #17250

## Validation Steps Performed
* Set up a lean Hyper-V VM for fast reboots
* `Set-VMComPort <vm> 1 \\.pipe\\<pipe>`
* Hook up WIL to write to COM1
* Add a ton of debug prints all over the place
* Read COM output with Putty for hours
* RTFM, and notice that the `WM_ENDSESSION` documentation states
  "the session can end any time after all applications
  have returned from processing this message"
* Be very very sad 
* Fix it
* Rebooting now shows on COM1 that persistence runs 
* Windows get restored after reboot 
2024-08-20 13:24:51 +02:00
James Holderness
131728b17d Fix input sequences split across the buffer boundary (#17738)
## Summary of the Pull Request

When conhost receives input from a conpty connection, and that input
arrives in a block larger than our 4K buffer, we can end up with a VT
sequence that's split at the buffer boundary. Previously that could
result in the start of the sequence being dropped, and the remaining
characters being interpreted as individual key presses.

This PR attempts to fix the issue by caching the unprocessed characters
from the start of the sequence, and then combining them with the second
half of the sequence when it's later received.

## Validation Steps Performed

I've confirmed that pasting into vim now works correctly with the sample
data from issue #16655. I've also tested with a `DECCTR` report larger
than 4K which would previously have been corrupted, and which now works
as expected.

## PR Checklist
- [x] Closes #16655
2024-08-19 19:22:56 -05:00
Windows Console Service Bot
37e2bc0caa Localize PDP changelogs - main - 08/16/2024 23:36:05 (#17732) 2024-08-19 13:52:54 -05:00
Dustin L. Howett
735ef2823e Restore the ability to disable checking for URLs (#17731)
Fixes #17727
2024-08-19 10:44:26 -05:00
Dustin L. Howett
faf21acbc7 atlas: draw selection colors as background/foreground instead of alpha overlay (#17725)
With the merge of #17638, selections are now accumulated early in the
rendering process. This allows Atlas, which currently makes decisions
about cell foreground/background at the time of text rendering,
awareness of the selection ranges *before* text rendering begins.

As a result, we can now paint the selection into the background and
foreground bitmaps. We no longer need to overlay a rectangle, or series
of rectangles, on top of the rendering surface and alpha blend the
selection color onto the final image.

As a reminder, "alpha selection" was always a stopgap because we didn't
have durable per-cell foreground and background customization in the
original DxEngine.

Selection foregrounds are not customizable, and will be chosen using the
same color distancing algorithm as the cursor. We can make them
customizable "easily" (once we figure out the schema for it) for #3580.

`ATLAS_DEBUG_SHOW_DIRTY` was using the `Selection` shading type to draw
colored regions. I didn't want to break that, so I elected to rename the
`Selection` shading type to `FilledRect` and keep its value. It helps
that the shader didn't have any special treatment for
`SHADING_TYPE_SELECTION`.

This fixes the entire category of issues created by selection being an
80%-opacity white rectangle. However, given that it changes the imputed
colors of the text it will reveal `SGR 8` concealed/hidden characters.

Refs #17355
Refs #14859
Refs #11181
Refs #8716
Refs #4971
Closes #3561
2024-08-19 14:54:18 +00:00
Dustin L. Howett
9b21b78fee pdp: add quick release notes to the store pages (#17730)
Now that the store displays changelogs, it seems unfair for us to not
put something in here.

These are intended to give a rough idea, not to be perfect, as they are
not the product of my hours of changelog writing (since I am lazy and
put that off until the day of release 🫣)
2024-08-16 18:25:40 -05:00
Dustin L. Howett
4c018efd64 chore: Update to TAEF 10.93.240607003 (#16595) 2024-08-16 22:50:19 +00:00
Dustin L. Howett
1ef497970f Introduce the concept of "selection spans" instead of "rects" (#17638) 2024-08-15 14:00:40 -05:00
James Holderness
65219d40ce Fix misalignment of Sixel image slices (#17724)
When we have a series of image slices of differing widths, which also
don't align with the cell boundaries, we can get rounding errors in the
scaling which makes the different slices appear misaligned.

This PR fixes the issue by removing the 4 pixel width alignment that was
enforced in the `ImageSlice` class, since that's not actually necessary
when the pixels themselves are already 4 bytes in size. And without
that, the widths should be correctly aligned with the cell boundaries.

## References and Relevant Issues

The initial Sixel implementation was added in PR #17421.

## Validation Steps Performed

I've confirmed that this fixes the rendering glitches reported in
#17711, and all my existing Sixel tests still work as expected.

Closes #17711
2024-08-15 09:39:28 -07:00
Leonard Hecker
bf44b6c360 Fix a misdiagnosis in MSVC 17.11 (#17723)
Mo' compiler, mo' problems.
2024-08-15 09:33:43 -07:00
Carlos Zamora
1511d2c2ad schema: add reloadEnvironmentVariables to newTerminalArgs (#17696) 2024-08-14 15:16:04 -05:00
Leonard Hecker
7fd9c5c789 Align the OSS ConPTY API with Windows 11 24H2 (#17704) 2024-08-14 15:15:50 -05:00
Leonard Hecker
9c1436775e Use a plain char array to pass connection input (#17710)
`HSTRING` does not permit strings that aren't null-terminated.
As such we'll simply use a plain char array which compiles down to
a `UINT32` and `wchar_t*` pointer pair. Unfortunately, cppwinrt uses
`char16_t` in place of `wchar_t`, and also offers no trivial conversion
between `winrt::array_view` and `std::wstring_view` either.
As such, most of this PR is about explicit type casting.

Closes #17697

## Validation Steps Performed
* Patch the `DeviceAttributes` implementation in `adaptDispatch.cpp`
  to respond like this:
   ```cpp
   _api.ReturnResponse({L"ABCD", 3});
   ```
* Open a WSL shell and execute this:
  ```sh
  printf "\e[c"; read
  ```
* Doesn't crash 
2024-08-13 21:35:47 -05:00
James Holderness
4a40c4329a Add support for querying the DECCTR color table report (#17708)
This PR introduces the framework for the `DECRQTSR` sequence which is
used to query terminal state reports. But for now I've just implemented
the `DECCTR` color table report, which provides a way for applications
to query the terminal's color scheme.

## References and Relevant Issues

This is the counterpart to the the `DECRSTS` sequence, which is used to
restore a color table report. That was implemented in PR #13139, but it
only became practical to report the color table once conpty passthrough
was added in PR #17510.

## Detailed Description of the Pull Request / Additional comments

This sequence has the option of reporting the colors as either HLS or
RGB, but in both cases the resolution is lower than 24 bits, so the
colors won't necessarily round-trip exactly when saving and restoring.
The HLS model in particular can accumulate rounding errors over time.

## Validation Steps Performed

I've added a basic unit test that confirms the colors are reported as
expected for both color models. The color values in these tests were
obtained from color reports on a real VT525 terminal.

## PR Checklist
- [x] Tests added/passed
2024-08-13 18:53:26 -05:00
Dustin L. Howett
06c07ab50d Switch to the new and beautiful VS Dev Shell icons (#17706)
We got some new icons for Developer Command Prompt and Developer
PowerShell from our friends over on Visual Studio!

This pull request includes them in the package, and fixes up the VS
dynamic profiles to reset any icons that matched the old paths.

This may be a minor breaking change for user settings, but we're making
the assumption that if they didn't change their VS profile icons from
the defaults, they probably want to follow us to the new defaults.

To prevent anything like this from happening again, we're going to stop
serializing icons for stub profiles.

I've also included a VS version of the PowerShell "black" icon which is
currently unused, but can be used in the future for PS7+-based VS Dev
Shell.

Closes #17627
2024-08-13 18:21:09 -05:00
Leonard Hecker
0fd8dc575f Remove CHAR_INFO munging for raster fonts (#17681)
`RealUnicodeToFalseUnicode` was described as:
> This routine converts a unicode string into the correct characters
> for an OEM (cp 437) font. This code is needed because the gdi glyph
> mapper converts unicode to ansi using codepage 1252 to index font.
> This is how the data is stored internally.

In other words, it takes a UCS2 string, translates it to the current
codepage and translates it back to UCS2 in the US version of Windows.
In the "eastern" DBCS version it "reinterprets" the DBCS string as
`CP_USA` (a particularly weird quirk).

The original implementation used to do this translation at every
opportunity where text went into or out of conhost.
The translation was weird, but it was consistent.
In Windows 10 RS1 conhost got a new UCS2-aware text buffer and
this translation was removed from most places, as the text buffer
was converted to store proper UCS2. This broke the entire concept
of the translation though. Whatever data you previously wrote with
something like `WriteConsoleOutputCharacter` now came back with
something entirely else via `ReadConsoleOutput`.

In other words, I believe past RS1 there was technically never any
point in "munging" `CHAR_INFO`s, as this only covered 2 API functions.

Still, this does mean that this PR represents an API breaking change.
It's a minor one though, because it only affects 2 API functions.
And more importantly, it's a necessary breaking change as we move
further and further away from correlating codepoint and column counts.

## Validation Steps Performed
* Remaining tests pass 
2024-08-13 18:18:16 -05:00
Leonard Hecker
9074e9d6a8 Fix session restoration of full buffers (#17654)
This removes the `Terminal::SetViewportPosition` call from session
restoration which was responsible for putting the viewport below
the buffer height and caused the renderer to fail.

In order to prevent such issues in the future, `SetViewportPosition`
now protects itself against out of bounds requests.

Closes #17639

## Validation Steps Performed
* Enable persistence
* Print `big.txt`
* Restart
* Looks good 
2024-08-13 18:17:17 -05:00
Dustin L. Howett
2478c643f4 Fix PowerShell profile warnings during WT build (oops) (#17705) 2024-08-13 11:12:30 -05:00
Dustin L. Howett
0199ca33dd Port selection in conhost and Terminal to use til::generational (#17676)
In #17638, I am moving selection to an earlier phase of rendering (so
that further phases can take it into account). Since I am drafting off
the design of search highlights, one of the required changes is moving
to passing `span`s of `point_span`s around to make selection effectively
zero-copy.

We can't easily have zero-copy selection propagation without caching,
and we can't have caching without mandatory cache invalidation.

This pull request moves both conhost and Terminal to use
`til::generational` for all selection members that impact the ranges
that would be produced from `GetSelectionRects`.

This required a move from `std::optional<>` to a boolean to determine
whether a selection was active in Terminal.

We will no longer regenerate the selection rects from the selection
anchors plus the text buffer *every single frame*.

Apart from being annoying to read, there is one downside.

If you begin a selection on a narrow character, _and that narrow
character later turns into a wide character_, we will show it as
half-selected.

This should be a rare-enough case that we can accept it as a regression.
2024-08-09 13:11:28 -05:00
Leonard Hecker
7c0d6d95db Slim down shell extension and elevate-shim (#15327)
This simplifies the code (from the perspective of the CPU) by doing
some miniscule-feels-good optimizations like replacing `snprintf` with
regular string concatenation and by doing an actual optimization by
removing the remaining calls to the WinRT `ApplicationModel` namespace.

More importantly however it fixes a bug: The only reason `elevate-shim`
worked at all is because the shell extension passed "wrong" parameters
to `CreateProcess`. Instead of repeating the application path in the
command line argument again, as is convention in C and on Windows, and
getting the 2nd and following parameters as an argument to `wWinMain`,
it used `GetCommandLineW` to get the original, broken command line.
This fixes the issue by passing the application path as the first
argument, which allows `elevate-shim` to be called like any other app.

## Validation Steps Performed
* Deploy WT and restart explorer
* Clicking "Open in Terminal (Dev)" works 
* Clicking "Open in Terminal (Dev)" while holding Ctrl+Shift
  opens WT as admin 
2024-08-09 15:33:12 +00:00
James Holderness
edfa3ea0f0 Remove SetTextAttributes from the ITerminalApi interface (#17685)
The only reason we had the `SetTextAttributes` method in `ITerminalApi`
was to allow for conhost to remap the default color attributes when the
VT PowerShell quirk was active. Since that quirk has now been removed,
there's no need for this API anymore.

## References and Relevant Issues

The PowerShell quirk was removed in PR #17666.

## Validation Steps Performed

I've had to update all the attribute tests in adapterTest to manually
check the expected attributes, since those checks were previously being
handled in a `SetTextAttributes` mock which no longer exists.

I've also performed some manual tests of the VT attribute operations to
double check that they're still working as expected.
2024-08-08 18:45:16 -05:00
Leonard Hecker
9ab2870bc3 Upgrade fmt to 11.0.2 (#16007)
Between fmt 7.1.3 and 11.0.2 a lot has happened. `wchar_t` support is
now more limited and implicit conversions don't work anymore.

Furthermore, even the non-`FMT_COMPILE` API is now compile-time checked
and so it fails to work in our UI code which passes `hstring` format
strings which aren't implicitly convertible to the expected type.
`fmt::runtime` was introduced for this but it also fails to work for
`hstring` parameters. To solve this, a new `RS_fmt` macro was added
to abstract the added `std::wstring_view` casting away.

Finally, some additional changes to reduce `stringstream` usage
have been made, whenever `format_to`, etc., is available.
This mostly affects `ActionArgs.cpp`.

Closes #16000

## Validation Steps Performed
* Compiles 
* Settings page opens 
2024-08-08 15:40:05 -07:00
518 changed files with 14765 additions and 8696 deletions

View File

@@ -1,6 +1,7 @@
name: "Bug report 🐛"
description: Report errors or unexpected behavior
labels: [Issue-Bug, Needs-Triage]
type: Bug
body:
- type: markdown
attributes:
@@ -12,7 +13,7 @@ body:
- type: input
attributes:
label: Windows Terminal version
placeholder: "1.7.3651.0"
placeholder: "1.21.2701.0"
description: |
You can copy the version number from the About dialog. Open the About dialog by opening the menu with the "V" button (to the right of the "+" button that opens a new tab) and choosing About from the end of the list.
validations:
@@ -21,7 +22,7 @@ body:
- type: input
attributes:
label: Windows build number
placeholder: "10.0.19042.0"
placeholder: "10.0.22621.0"
description: |
Please run `ver` or `[Environment]::OSVersion`.
validations:
@@ -32,9 +33,9 @@ body:
label: Other Software
description: If you're reporting a bug about our interaction with other software, what software? What versions?
placeholder: |
vim 8.2 (inside WSL)
OpenSSH_for_Windows_8.1p1
My Cool Application v0.3 (include a code snippet if it would help!)
vim 9.1 (inside WSL)
OpenSSH_for_Windows_9.5p1
My Cool Application v0.4 (include a code snippet if it would help!)
validations:
required: false

View File

@@ -1,10 +0,0 @@
---
name: "Documentation Issue 📚"
about: Report issues in our documentation
title: ''
labels: Issue-Docs
assignees: ''
---
<!-- Briefly describe which document needs to be corrected and why. -->

View File

@@ -1,35 +0,0 @@
---
name: "Feature Request/Idea 🚀"
about: Suggest a new feature or improvement (this does not mean you have to implement
it)
title: ''
labels: Issue-Feature
assignees: ''
---
<!--
🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨
I ACKNOWLEDGE THE FOLLOWING BEFORE PROCEEDING:
1. If I delete this entire template and go my own path, the core team may close my issue without further explanation or engagement.
2. If I list multiple bugs/concerns in this one issue, the core team may close my issue without further explanation or engagement.
3. If I write an issue that has many duplicates, the core team may close my issue without further explanation or engagement (and without necessarily spending time to find the exact duplicate ID number).
4. If I leave the title incomplete when filing the issue, the core team may close my issue without further explanation or engagement.
5. If I file something completely blank in the body, the core team may close my issue without further explanation or engagement.
All good? Then proceed!
-->
# Description of the new feature/enhancement
<!--
A clear and concise description of what the problem is that the new feature would solve.
Describe why and how a user would use this new functionality (if applicable).
-->
# Proposed technical implementation details (optional)
<!--
A clear and concise description of what you want to happen.
-->

View File

@@ -0,0 +1,20 @@
name: "Feature Request/Idea 🚀"
description: Suggest a new feature or improvement (this does not mean you have to implement it)
labels: [Issue-Feature]
type: Feature
body:
- type: textarea
attributes:
label: Description of the new feature
description: A clear and concise description of what the problem is that the new feature would solve.
placeholder: |
... and guess what? I have four Terminals. And I have a hover car, and a hover house. And my computer's a runner, and it shows.
validations:
required: true
- type: textarea
attributes:
label: Proposed technical implementation details
description: This field is optional. If you have any ideas, let us know!
validations:
required: false

View File

@@ -5,6 +5,7 @@ breadcrumbs
ccmp
ccon
clickable
cmark
CMMI
colorbrewer
consvc
@@ -22,11 +23,13 @@ Emacspeak
Fitt
FTCS
gantt
gfm
ghe
gje
godbolt
hyperlinking
hyperlinks
Kbds
kje
libfuzzer
liga
@@ -43,6 +46,7 @@ mkmk
mnt
mru
nje
NTMTo
notwrapped
ogonek
overlined

View File

@@ -43,6 +43,7 @@ DONTADDTORECENT
DWMSBT
DWMWA
DWORDLONG
EMPH
endfor
ENDSESSION
enumset
@@ -62,6 +63,7 @@ GETDESKWALLPAPER
GETHIGHCONTRAST
GETMOUSEHOVERTIME
GETTEXTLENGTH
HARDBREAKS
Hashtable
HIGHCONTRASTON
HIGHCONTRASTW
@@ -96,6 +98,7 @@ IGraphics
IImage
IInheritable
IMap
imm
IMonarch
IObject
iosfwd
@@ -114,6 +117,7 @@ IUri
IVirtual
KEYSELECT
LCID
LINEBREAK
llabs
llu
localtime
@@ -147,6 +151,7 @@ NIF
NIN
NOAGGREGATION
NOASYNC
NOBREAKS
NOCHANGEDIR
NOPROGRESS
NOREDIRECTIONBITMAP
@@ -174,6 +179,7 @@ PALLOC
PATINVERT
PEXPLICIT
PICKFOLDERS
PINPUT
pmr
ptstr
QUERYENDSESSION
@@ -202,6 +208,7 @@ SINGLEUSE
SIZENS
smoothstep
snprintf
SOFTBREAK
spsc
sregex
SRWLOC

View File

@@ -104,6 +104,7 @@
^doc/reference/UTF8-torture-test\.txt$
^doc/reference/windows-terminal-logo\.ans$
^oss/
^NOTICE.md
^samples/PixelShaders/Screenshots/
^src/interactivity/onecore/BgfxEngine\.
^src/renderer/atlas/

View File

@@ -1,5 +0,0 @@
EOB
swrapped
wordi
wordiswrapped
wrappe

View File

@@ -9,7 +9,6 @@ ABORTIFHUNG
ACCESSTOKEN
acidev
ACIOSS
ACover
acp
actctx
ACTCTXW
@@ -17,6 +16,8 @@ ADDALIAS
ADDREF
ADDSTRING
ADDTOOL
adml
admx
AFill
AFX
AHelper
@@ -87,6 +88,7 @@ Autowrap
AVerify
awch
azurecr
AZZ
backgrounded
Backgrounder
backgrounding
@@ -143,8 +145,8 @@ BTNFACE
bufferout
buffersize
buflen
buildtransitive
buildsystems
buildtransitive
BValue
bytebuffer
cac
@@ -180,7 +182,6 @@ CFuzz
cgscrn
chafa
changelists
charinfo
CHARSETINFO
chh
chshdng
@@ -264,7 +265,6 @@ consolegit
consolehost
CONSOLEIME
consoleinternal
Consoleroot
CONSOLESETFOREGROUND
consoletaeftemplates
consoleuwp
@@ -341,6 +341,7 @@ CXVIRTUALSCREEN
CXVSCROLL
CYFRAME
CYFULLSCREEN
cygdrive
CYHSCROLL
CYMIN
CYPADDEDBORDER
@@ -386,7 +387,7 @@ DECCIR
DECCKM
DECCKSR
DECCOLM
DECCRA
deccra
DECCTR
DECDC
DECDHL
@@ -398,7 +399,7 @@ DECEKBD
DECERA
DECFI
DECFNK
DECFRA
decfra
DECGCI
DECGCR
DECGNL
@@ -566,6 +567,7 @@ entrypoints
ENU
ENUMLOGFONT
ENUMLOGFONTEX
EOB
EOK
EPres
EQU
@@ -727,7 +729,6 @@ GHIJKL
gitcheckin
gitfilters
gitlab
gitmodules
gle
GLOBALFOCUS
GLYPHENTRY
@@ -785,6 +786,7 @@ HIWORD
HKCU
hkey
hkl
HKLM
hlocal
hlsl
HMB
@@ -867,6 +869,7 @@ INLINEPREFIX
inproc
Inputkeyinfo
Inputreadhandledata
INPUTSCOPE
INSERTMODE
INTERACTIVITYBASE
INTERCEPTCOPYPASTE
@@ -916,6 +919,7 @@ Keymapping
keyscan
keystate
keyups
Kickstart
KILLACTIVE
KILLFOCUS
kinda
@@ -1021,7 +1025,6 @@ lstatus
lstrcmp
lstrcmpi
LTEXT
LTLTLTLTL
ltsc
LUID
luma
@@ -1116,7 +1119,6 @@ msrc
MSVCRTD
MTSM
Munged
munges
murmurhash
muxes
myapplet
@@ -1218,7 +1220,6 @@ ntlpcapi
ntm
ntrtl
ntstatus
NTSYSCALLAPI
nttree
nturtl
ntuser
@@ -1295,6 +1296,7 @@ parms
PATCOPY
pathcch
PATTERNID
pbstr
pcb
pcch
PCCHAR
@@ -1380,9 +1382,11 @@ POSTCHARBREAKS
POSX
POSXSCROLL
POSYSCROLL
ppbstr
PPEB
ppf
ppidl
pprg
PPROC
ppropvar
ppsi
@@ -1461,6 +1465,7 @@ QWER
Qxxxxxxxxxxxxxxx
qzmp
RAII
Ralph
RALT
rasterbar
rasterfont
@@ -1526,7 +1531,6 @@ rftp
rgbi
RGBQUAD
rgbs
rgci
rgfae
rgfte
rgn
@@ -1604,6 +1608,7 @@ SELECTALL
SELECTEDFONT
SELECTSTRING
Selfhosters
Serbo
SERVERDLL
SETACTIVE
SETBUDDYINT
@@ -1698,6 +1703,7 @@ srcsrv
SRCSRVTRG
srctool
srect
SRGS
srvinit
srvpipe
ssa
@@ -1735,6 +1741,7 @@ swapchain
swapchainpanel
SWMR
SWP
swrapped
SYMED
SYNCPAINT
syscalls
@@ -1832,8 +1839,6 @@ TOPDOWNDIB
TOpt
tosign
touchpad
Tpp
Tpqrst
tracelogging
traceviewpp
trackbar
@@ -1846,7 +1851,6 @@ triaging
TRIMZEROHEADINGS
trx
tsa
tsattrs
tsgr
tsm
TStr
@@ -1958,7 +1962,6 @@ VPACKMANIFESTDIRECTORY
VPR
VREDRAW
vsc
vsconfig
vscprintf
VSCROLL
vsdevshell
@@ -1975,10 +1978,8 @@ vswhere
vtapp
VTE
VTID
vtio
vtmode
vtpipeterm
vtpt
VTRGB
VTRGBTo
vtseq
@@ -2000,7 +2001,6 @@ wcswidth
wddm
wddmcon
WDDMCONSOLECONTEXT
WDK
wdm
webpage
websites
@@ -2015,6 +2015,7 @@ WHelper
wic
WIDTHSCROLL
Widthx
Wiggum
wil
WImpl
WINAPI
@@ -2074,7 +2075,6 @@ winuserp
WINVER
wistd
wmain
wmemory
WMSZ
wnd
WNDALLOC
@@ -2085,6 +2085,8 @@ WNDCLASSW
Wndproc
WNegative
WNull
wordi
wordiswrapped
workarea
WOutside
WOWARM
@@ -2098,6 +2100,7 @@ WPrep
WPresent
wprp
wprpi
wrappe
wregex
writeback
WRITECONSOLE
@@ -2141,6 +2144,7 @@ XBUTTONDOWN
XBUTTONUP
XCast
XCENTER
xchar
xcopy
XCount
xdy
@@ -2172,6 +2176,7 @@ yact
YCast
YCENTER
YCount
yizz
YLimit
YPan
YSubstantial
@@ -2185,3 +2190,4 @@ ZCtrl
ZWJs
ZYXWVU
ZYXWVUTd
zzf

View File

@@ -22,6 +22,7 @@ vcvars\w*
ROY\sG\.\sBIV
!(?:(?i)ESC)!\[
!(?:(?i)CSI)!(?:\d+(?:;\d+|)m|[ABCDF])
(?i)rgb:[a-z0-9]{2,4}/[a-z0-9]{2,4}/[a-z0-9]{2,4}
# SSE intrinsics like "_mm_subs_epu16"
\b_mm(?:|256|512)_\w+\b

View File

@@ -13,7 +13,7 @@ jobs:
name: Add issue to project
runs-on: ubuntu-latest
steps:
- uses: actions/add-to-project@v1.0.1
- uses: actions/add-to-project@v1.0.2
with:
project-url: https://github.com/orgs/microsoft/projects/159
github-token: ${{ secrets.ADD_TO_PROJECT_PAT }}

View File

@@ -23,6 +23,12 @@
"name": "Upload package to nuget feed",
"icon": "\uE898",
"description": "Go download a .nupkg, put it in ~/Downloads, and use this to push to our private feed."
},
{
"input": "runut /name:**\u001b[D",
"name": "Run a test",
"icon": "",
"description": "Enter the name of a test to run"
}
]
}

175
NOTICE.md
View File

@@ -281,6 +281,181 @@ CONDITIONS OF ANY KIND, either express or implied. See the License for the
specific language governing permissions and limitations under the License.
```
## cmark
**Source**: [https://github.com/commonmark/cmark](https://github.com/commonmark/cmark)
### License
Copyright (c) 2014, John MacFarlane
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the following
disclaimer in the documentation and/or other materials provided
with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-----
houdini.h, houdini_href_e.c, houdini_html_e.c, houdini_html_u.c
derive from https://github.com/vmg/houdini (with some modifications)
Copyright (C) 2012 Vicent Martí
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
of the Software, and to permit persons to whom the Software is furnished to do
so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
-----
buffer.h, buffer.c, chunk.h
are derived from code (C) 2012 Github, Inc.
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
of the Software, and to permit persons to whom the Software is furnished to do
so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
-----
utf8.c and utf8.c
are derived from utf8proc
(<http://www.public-software-group.org/utf8proc>),
(C) 2009 Public Software Group e. V., Berlin, Germany.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
-----
The normalization code in normalize.py was derived from the
markdowntest project, Copyright 2013 Karl Dubost:
The MIT License (MIT)
Copyright (c) 2013 Karl Dubost
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-----
The CommonMark spec (test/spec.txt) is
Copyright (C) 2014-15 John MacFarlane
Released under the Creative Commons CC-BY-SA 4.0 license:
<http://creativecommons.org/licenses/by-sa/4.0/>.
-----
The test software in test/ is
Copyright (c) 2014, John MacFarlane
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the following
disclaimer in the documentation and/or other materials provided
with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# Microsoft Open Source
This product also incorporates source code from other Microsoft open source projects, all licensed under the MIT license.

View File

@@ -405,6 +405,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "RenderingTests", "src\tools
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Microsoft.Terminal.UI", "src\cascadia\UIHelpers\UIHelpers.vcxproj", "{6515F03F-E56D-4DB4-B23D-AC4FB80DB36F}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Microsoft.Terminal.UI.Markdown", "src\cascadia\UIMarkdown\UIMarkdown.vcxproj", "{7615F03F-E56D-4DB4-B23D-BD4FB80DB36F}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "benchcat", "src\tools\benchcat\benchcat.vcxproj", "{2C836962-9543-4CE5-B834-D28E1F124B66}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ConsoleMonitor", "src\tools\ConsoleMonitor\ConsoleMonitor.vcxproj", "{328729E9-6723-416E-9C98-951F1473BBE1}"
@@ -2302,6 +2304,28 @@ Global
{6515F03F-E56D-4DB4-B23D-AC4FB80DB36F}.Release|x64.Build.0 = Release|x64
{6515F03F-E56D-4DB4-B23D-AC4FB80DB36F}.Release|x86.ActiveCfg = Release|Win32
{6515F03F-E56D-4DB4-B23D-AC4FB80DB36F}.Release|x86.Build.0 = Release|Win32
{7615F03F-E56D-4DB4-B23D-BD4FB80DB36F}.AuditMode|Any CPU.ActiveCfg = Debug|Win32
{7615F03F-E56D-4DB4-B23D-BD4FB80DB36F}.AuditMode|ARM64.ActiveCfg = Release|ARM64
{7615F03F-E56D-4DB4-B23D-BD4FB80DB36F}.AuditMode|x64.ActiveCfg = Release|x64
{7615F03F-E56D-4DB4-B23D-BD4FB80DB36F}.AuditMode|x86.ActiveCfg = Release|Win32
{7615F03F-E56D-4DB4-B23D-BD4FB80DB36F}.Debug|Any CPU.ActiveCfg = Debug|x64
{7615F03F-E56D-4DB4-B23D-BD4FB80DB36F}.Debug|ARM64.ActiveCfg = Debug|ARM64
{7615F03F-E56D-4DB4-B23D-BD4FB80DB36F}.Debug|ARM64.Build.0 = Debug|ARM64
{7615F03F-E56D-4DB4-B23D-BD4FB80DB36F}.Debug|x64.ActiveCfg = Debug|x64
{7615F03F-E56D-4DB4-B23D-BD4FB80DB36F}.Debug|x64.Build.0 = Debug|x64
{7615F03F-E56D-4DB4-B23D-BD4FB80DB36F}.Debug|x86.ActiveCfg = Debug|Win32
{7615F03F-E56D-4DB4-B23D-BD4FB80DB36F}.Debug|x86.Build.0 = Debug|Win32
{7615F03F-E56D-4DB4-B23D-BD4FB80DB36F}.Fuzzing|Any CPU.ActiveCfg = Fuzzing|x64
{7615F03F-E56D-4DB4-B23D-BD4FB80DB36F}.Fuzzing|ARM64.ActiveCfg = Fuzzing|ARM64
{7615F03F-E56D-4DB4-B23D-BD4FB80DB36F}.Fuzzing|x64.ActiveCfg = Fuzzing|x64
{7615F03F-E56D-4DB4-B23D-BD4FB80DB36F}.Fuzzing|x86.ActiveCfg = Fuzzing|Win32
{7615F03F-E56D-4DB4-B23D-BD4FB80DB36F}.Release|Any CPU.ActiveCfg = Release|x64
{7615F03F-E56D-4DB4-B23D-BD4FB80DB36F}.Release|ARM64.ActiveCfg = Release|ARM64
{7615F03F-E56D-4DB4-B23D-BD4FB80DB36F}.Release|ARM64.Build.0 = Release|ARM64
{7615F03F-E56D-4DB4-B23D-BD4FB80DB36F}.Release|x64.ActiveCfg = Release|x64
{7615F03F-E56D-4DB4-B23D-BD4FB80DB36F}.Release|x64.Build.0 = Release|x64
{7615F03F-E56D-4DB4-B23D-BD4FB80DB36F}.Release|x86.ActiveCfg = Release|Win32
{7615F03F-E56D-4DB4-B23D-BD4FB80DB36F}.Release|x86.Build.0 = Release|Win32
{2C836962-9543-4CE5-B834-D28E1F124B66}.AuditMode|Any CPU.ActiveCfg = AuditMode|Win32
{2C836962-9543-4CE5-B834-D28E1F124B66}.AuditMode|ARM64.ActiveCfg = Release|ARM64
{2C836962-9543-4CE5-B834-D28E1F124B66}.AuditMode|x64.ActiveCfg = Release|x64
@@ -2455,6 +2479,7 @@ Global
{613CCB57-5FA9-48EF-80D0-6B1E319E20C4} = {A10C4720-DCA4-4640-9749-67F4314F527C}
{37C995E0-2349-4154-8E77-4A52C0C7F46D} = {A10C4720-DCA4-4640-9749-67F4314F527C}
{6515F03F-E56D-4DB4-B23D-AC4FB80DB36F} = {61901E80-E97D-4D61-A9BB-E8F2FDA8B40C}
{7615F03F-E56D-4DB4-B23D-BD4FB80DB36F} = {61901E80-E97D-4D61-A9BB-E8F2FDA8B40C}
{2C836962-9543-4CE5-B834-D28E1F124B66} = {A10C4720-DCA4-4640-9749-67F4314F527C}
{328729E9-6723-416E-9C98-951F1473BBE1} = {A10C4720-DCA4-4640-9749-67F4314F527C}
{BE92101C-04F8-48DA-99F0-E1F4F1D2DC48} = {A10C4720-DCA4-4640-9749-67F4314F527C}

View File

@@ -56,7 +56,15 @@ Dies ist ein Open Source-Projekt, und wir freuen uns über die Teilnahme der Com
<ReleaseNotes>
Version __VERSION_NUMBER__
Weitere Einzelheiten finden Sie auf der Seite der GitHub-Veröffentlichungen.
Wir haben umgeschrieben, wie Konsolenanwendungen im Terminal gehostet werden! Melden Sie alle auftretenden Fehler.
- Terminal unterstützt jetzt Sixels!
- Sie können jetzt ein angedocktes Fenster öffnen, das Ausschnitte von Befehlen enthält, die Sie gespeichert haben, um sie später zu verwenden.
- Für Benutzer der Eingabeaufforderung der neuesten Version von Windows 11 wird möglicherweise ein „Kurzer Tipp“-Symbol angezeigt, das installierbare Software von WinGet
vorschlägt
- Ausgewählter Text wird jetzt viel sichtbarer (und anpassbarer!)
- Eine Reihe von Zuverlässigkeitsfehlern, Komfortproblemen und Ärgernissen wurden behoben.
Weitere Informationen finden Sie auf unserer GitHub-Releaseseite.
</ReleaseNotes>
<ScreenshotCaptions>
<!-- Valid length: 200 character limit, up to 9 elements per platform -->

View File

@@ -56,6 +56,13 @@ This is an open source project and we welcome community participation. To partic
<ReleaseNotes _locID="App_ReleaseNotes">
<!-- _locComment_text="{MaxLength=1500} {Locked=__VERSION_NUMBER__} App Release Note" -->Version __VERSION_NUMBER__
- We've rewritten how console applications are hosted inside Terminal! Please report any bugs you encounter.
- Terminal now supports Sixels!
- You can now open a docked panel containing snippets of commands you have saved to use later
- Command Prompt users on the latest Windows 11 release may see a "quick tip" icon that suggests installable software from WinGet
- Selected text will now be much more visible (and customizable!)
- A number of reliabilty bugs, convenience issues and annoyances have been fixed.
Please see our GitHub releases page for additional details.
</ReleaseNotes>
<ScreenshotCaptions>

View File

@@ -56,7 +56,14 @@ Este es un proyecto de fuente abierta y animamos a la comunidad a participar. Pa
<ReleaseNotes>
Versión __VERSION_NUMBER__
Para más información, consulte nuestra página de versiones de GitHub.
- Hemos reescrito cómo se hospedan las aplicaciones de consola en Terminal. Informe de los errores que encuentre.
- Terminal ahora admite sixeles.
- Ahora puede abrir un panel acoplado que contenga fragmentos de comandos que haya guardado para usarlos más adelante
- Los usuarios del símbolo del sistema de la versión más reciente de Windows 11 pueden ver un icono de "sugerencia rápida" que sugiere software instalable de WinGet
- El texto seleccionado ahora será mucho más visible (y personalizable)
- Se han corregido varios errores de fiabilidad, problemas de comodidad y molestias.
Consulte la página de versiones de GitHub para más información.
</ReleaseNotes>
<ScreenshotCaptions>
<!-- Valid length: 200 character limit, up to 9 elements per platform -->

View File

@@ -56,7 +56,14 @@ Il sagit dun projet open source et nous vous invitons à participer dans l
<ReleaseNotes>
Version __VERSION_NUMBER__
Consultez la page des versions de GitHub pour plus dinformations.
- Nous avons réécrit la manière dont les applications de console sont hébergées dans Terminal ! Veuillez signaler tout bug que vous rencontrez.
- Le terminal prend désormais en charge Sixels !
- Vous pouvez désormais ouvrir un panneau ancré contenant des extraits de commandes que vous avez enregistrées pour les utiliser ultérieurement
- Les utilisateurs de l'invite de commande sur la dernière version de Windows 11 peuvent voir une icône « astuce rapide » qui suggère un logiciel installable à partir de WinGet
- Le texte sélectionné sera désormais beaucoup plus visible (et personnalisable !)
- Un certain nombre de bugs de fiabilité, de problèmes de commodité et de désagréments ont été corrigés.
Veuillez consulter notre page de versions GitHub pour plus de détails.
</ReleaseNotes>
<ScreenshotCaptions>
<!-- Valid length: 200 character limit, up to 9 elements per platform -->

View File

@@ -54,9 +54,16 @@ Si tratta di un progetto open source e la partecipazione della community è molt
</DevStudio>
<ReleaseNotes>
Versione __VERSION_NUMBER__
Versione __VERSION_NUMBER__
Per ulteriori dettagli, consulta la nostra pagina delle versioni di GitHub.
- È stato riscritto il modo in cui le applicazioni della console vengono ospitate all'interno di Terminale. Segnala eventuali bug riscontrati.
- Terminal supporta ora Sixel.
- È ora possibile aprire un pannello ancorato contenente frammenti di comandi salvati per usarli in seguito
- Gli utenti del prompt dei comandi nella versione più recente di Windows 11 potrebbero visualizzare un'icona di "suggerimento rapido" che consiglia il software installabile da WinGet
- Il testo selezionato sarà ora molto più visibile, oltre che personalizzabile.
- Sono stati risolti diversi bug di affidabilità, problemi di praticità e fastidi.
Per altri dettagli, vedi la pagina delle versioni di GitHub.
</ReleaseNotes>
<ScreenshotCaptions>
<!-- Valid length: 200 character limit, up to 9 elements per platform -->

View File

@@ -56,7 +56,14 @@
<ReleaseNotes>
バージョン __VERSION_NUMBER__
詳細については、GitHub リリースのページをご覧ください。
- ターミナル内でのコンソール アプリケーションのホスト方法を書き換えました。発生したバグを報告してください。
- ターミナルで Sixels がサポートされるようになりました。
- 後で使用するために保存したコマンドのスニペットを含むドッキング パネルを開けるようになりました
- 最新の Windows 11 リリースのコマンド プロンプト ユーザーには、WinGet からインストール可能なソフトウェアを提案する "クイック ヒント" アイコンが表示される場合があります
- 選択したテキストが大幅に見やすくなりました (カスタマイズも可能です)
- 信頼性に関するバグ、利便性の問題、不快な問題の多くが修正されました。
詳細については、GitHub リリース ページをご覧ください。
</ReleaseNotes>
<ScreenshotCaptions>
<!-- Valid length: 200 character limit, up to 9 elements per platform -->

View File

@@ -56,6 +56,13 @@
<ReleaseNotes>
버전 __VERSION_NUMBER__
- 콘솔 애플리케이션이 터미널 내에서 호스팅되는 방법을 다시 작성했습니다! 발생한 버그를 보고하세요.
- 터미널에서 이제 Sixels를 지원합니다!
- 이제 나중에 사용하기 위해 저장한 명령 조각이 포함된 도킹된 패널을 열 수 있습니다.
- 최신 Windows 11 릴리스의 명령 프롬프트 사용자는 WinGet에서 설치 가능한 소프트웨어를 제안하는 "빠른 팁" 아이콘을 볼 수 있습니다.
- 이제 선택한 텍스트가 훨씬 더 잘 표시됩니다(사용자 지정도 가능!).
- 여러 신뢰성 버그, 편의 문제 및 성가신 사항이 수정되었습니다.
자세한 내용은 GitHub 릴리스 페이지를 참조하세요.
</ReleaseNotes>
<ScreenshotCaptions>

View File

@@ -56,7 +56,14 @@ Este é um projeto de código aberto e a participação da comunidade é bem-vin
<ReleaseNotes>
Versão __VERSION_NUMBER__
Consulte nossa página de lançamentos do GitHub para obter detalhes adicionais.
- Reescrevemos a forma como os aplicativos de console são hospedados no Terminal! Certifique-se de reportar os bugs que você encontrar.
- O terminal agora é compatível com o Sixels!
- Agora você pode abrir um painel acoplado contendo snippets de comandos que você salvou para usar mais tarde
- Os usuários do Prompt de Comando na versão mais recente do Windows 11 podem ver um ícone de "dica rápida", que sugere softwares instaláveis a partir do WinGet
- O texto selecionado agora ficará muito mais visível (e personalizável!)
- Vários bugs de confiabilidade, problemas de conveniência e incômodos foram resolvidos.
Confira nossa página de lançamentos no GitHub para obter mais detalhes.
</ReleaseNotes>
<ScreenshotCaptions>
<!-- Valid length: 200 character limit, up to 9 elements per platform -->

View File

@@ -56,7 +56,14 @@
<ReleaseNotes>
Vėѓѕіöй __VERSION_NUMBER__ !!! !!! !
Рļєάśé ѕέę όüґ ĢίŧĦŭв řęļзąѕєš рαġè ƒőŗ äđδĭτíθņâℓ đέтαιľś. !!! !!! !!! !!! !!! !!!
- Ẁē'νё ŕéẁѓĭτťёñ ћοώ ĉòπşõℓε άррℓіċªťįõпѕ αяе ĥθѕťэđ įŋšιďé Ţєямїńąℓ! Рļéаšė яёροřτ αņу ьϋģš ýõμ éпćŏџήţęя. !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!
- Ţëямΐʼnαļ ńóẃ ŝüррöятš Śїхέłś! !!! !!! !!!
- ¥оų ĉåи ńòŵ θρėñ д đбčĸэď ράńέļ ċőлŧăīņϊňģ śⁿіφφëťś оƒ ςōмmàⁿďş ŷŏũ ĥªν℮ şåνěđ τσ üśε łαťэŗ !!! !!! !!! !!! !!! !!! !!! !!! !!!
- Ćοмmäлđ Рřōmφť üş℮ŗѕ öη τће ļāťëšτ Щīйđôώѕ 11 řёℓеаѕĕ måў ŝэε ά "qůïςκ ŧĭр" ιсôñ τĥдт šűğģєѕŧѕ ίńśŧăłłавļз šôƒţẁαгέ ƒґόm ЩĩйĞéţ !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!!
- Śєļèċťєď ţĕжт ωϊŀļ йǿẃ ьέ mџ¢н мǿѓε νĭŝϊъļė (άŋđ сŭŝтŏмΐżдьļē!) !!! !!! !!! !!! !!! !!! !
- Ä ņϋmъŗ ŏƒ ѓēŀїаъïļŧÿ ьüĝś, ςôⁿνėηĭ℮иć℮ îѕšůëş ăπð âлňбγдňçėŝ ћªνε ъēёп ƒΐ×еð. !!! !!! !!! !!! !!! !!! !!! !!!
Ρĺёàŝ℮ ŝез ǿúг ĢīťНŭъ řěłεαśèŝ φāğ℮ ƒóѓ дďδітĭøиąℓ ð℮тªїľŝ. !!! !!! !!! !!! !!! !!!
</ReleaseNotes>
<ScreenshotCaptions>
<!-- Valid length: 200 character limit, up to 9 elements per platform -->

View File

@@ -56,7 +56,14 @@
<ReleaseNotes>
Vėѓѕіöй __VERSION_NUMBER__ !!! !!! !
Рļєάśé ѕέę όüґ ĢίŧĦŭв řęļзąѕєš рαġè ƒőŗ äđδĭτíθņâℓ đέтαιľś. !!! !!! !!! !!! !!! !!!
- Ẁē'νё ŕéẁѓĭτťёñ ћοώ ĉòπşõℓε άррℓіċªťįõпѕ αяе ĥθѕťэđ įŋšιďé Ţєямїńąℓ! Рļéаšė яёροřτ αņу ьϋģš ýõμ éпćŏџήţęя. !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!
- Ţëямΐʼnαļ ńóẃ ŝüррöятš Śїхέłś! !!! !!! !!!
- ¥оų ĉåи ńòŵ θρėñ д đбčĸэď ράńέļ ċőлŧăīņϊňģ śⁿіφφëťś оƒ ςōмmàⁿďş ŷŏũ ĥªν℮ şåνěđ τσ üśε łαťэŗ !!! !!! !!! !!! !!! !!! !!! !!! !!!
- Ćοмmäлđ Рřōmφť üş℮ŗѕ öη τће ļāťëšτ Щīйđôώѕ 11 řёℓеаѕĕ måў ŝэε ά "qůïςκ ŧĭр" ιсôñ τĥдт šűğģєѕŧѕ ίńśŧăłłавļз šôƒţẁαгέ ƒґόm ЩĩйĞéţ !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!!
- Śєļèċťєď ţĕжт ωϊŀļ йǿẃ ьέ mџ¢н мǿѓε νĭŝϊъļė (άŋđ сŭŝтŏмΐżдьļē!) !!! !!! !!! !!! !!! !!! !
- Ä ņϋmъŗ ŏƒ ѓēŀїаъïļŧÿ ьüĝś, ςôⁿνėηĭ℮иć℮ îѕšůëş ăπð âлňбγдňçėŝ ћªνε ъēёп ƒΐ×еð. !!! !!! !!! !!! !!! !!! !!! !!!
Ρĺёàŝ℮ ŝез ǿúг ĢīťНŭъ řěłεαśèŝ φāğ℮ ƒóѓ дďδітĭøиąℓ ð℮тªїľŝ. !!! !!! !!! !!! !!! !!!
</ReleaseNotes>
<ScreenshotCaptions>
<!-- Valid length: 200 character limit, up to 9 elements per platform -->

View File

@@ -56,7 +56,14 @@
<ReleaseNotes>
Vėѓѕіöй __VERSION_NUMBER__ !!! !!! !
Рļєάśé ѕέę όüґ ĢίŧĦŭв řęļзąѕєš рαġè ƒőŗ äđδĭτíθņâℓ đέтαιľś. !!! !!! !!! !!! !!! !!!
- Ẁē'νё ŕéẁѓĭτťёñ ћοώ ĉòπşõℓε άррℓіċªťįõпѕ αяе ĥθѕťэđ įŋšιďé Ţєямїńąℓ! Рļéаšė яёροřτ αņу ьϋģš ýõμ éпćŏџήţęя. !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!
- Ţëямΐʼnαļ ńóẃ ŝüррöятš Śїхέłś! !!! !!! !!!
- ¥оų ĉåи ńòŵ θρėñ д đбčĸэď ράńέļ ċőлŧăīņϊňģ śⁿіφφëťś оƒ ςōмmàⁿďş ŷŏũ ĥªν℮ şåνěđ τσ üśε łαťэŗ !!! !!! !!! !!! !!! !!! !!! !!! !!!
- Ćοмmäлđ Рřōmφť üş℮ŗѕ öη τће ļāťëšτ Щīйđôώѕ 11 řёℓеаѕĕ måў ŝэε ά "qůïςκ ŧĭр" ιсôñ τĥдт šűğģєѕŧѕ ίńśŧăłłавļз šôƒţẁαгέ ƒґόm ЩĩйĞéţ !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!!
- Śєļèċťєď ţĕжт ωϊŀļ йǿẃ ьέ mџ¢н мǿѓε νĭŝϊъļė (άŋđ сŭŝтŏмΐżдьļē!) !!! !!! !!! !!! !!! !!! !
- Ä ņϋmъŗ ŏƒ ѓēŀїаъïļŧÿ ьüĝś, ςôⁿνėηĭ℮иć℮ îѕšůëş ăπð âлňбγдňçėŝ ћªνε ъēёп ƒΐ×еð. !!! !!! !!! !!! !!! !!! !!! !!!
Ρĺёàŝ℮ ŝез ǿúг ĢīťНŭъ řěłεαśèŝ φāğ℮ ƒóѓ дďδітĭøиąℓ ð℮тªїľŝ. !!! !!! !!! !!! !!! !!!
</ReleaseNotes>
<ScreenshotCaptions>
<!-- Valid length: 200 character limit, up to 9 elements per platform -->

View File

@@ -56,7 +56,14 @@
<ReleaseNotes>
Версия __VERSION_NUMBER__
Дополнительные сведения см. на странице «Выпуски GitHub».
Мы переписали, как консольные приложения размещаются внутри Терминала! Сообщайте о любых ошибках, с которыми вы столкнулись.
Терминал теперь поддерживает форматы Sixel!
Теперь вы можете открыть закрепленную панель, содержащую фрагменты команд, которые вы сохранили для использования в дальнейшем
Пользователи командной строки в новейшем выпуске Windows 11 могут увидеть значок "краткой подсказки", который предлагает устанавливаемые программы из WinGet
Выделенный текст теперь станет более видимым (и настраиваемым!)
Исправлено несколько ошибок надежности, проблем с удобством, а также устранены раздражающие моменты.
Дополнительные сведения см. на странице выпусков GitHub.
</ReleaseNotes>
<ScreenshotCaptions>
<!-- Valid length: 200 character limit, up to 9 elements per platform -->

View File

@@ -54,7 +54,14 @@
</DevStudio>
<ReleaseNotes>
版本 __VERSION_NUMBER__
Version __VERSION_NUMBER__
- 我们已改变主机应用程序在终端内的托管方式!请报告遇到的任何 bug。
- 终端现在支持 Sixels!
- 现在可以打开一个停靠面板,其中包含已保存供以后使用的命令片段
- 最新 Windows 11 版本上的命令提示用户可能会看到“快速提示”图标,该图标建议从 WinGet 安装软件
- 所选文本现在将具有更高的可见性(和可自定义性!)
- 修复了许多可靠性 bug、便利性问题和令人烦恼的问题。
有关其他详细信息,请参阅我们的 GitHub 发布页面。
</ReleaseNotes>

View File

@@ -56,7 +56,14 @@
<ReleaseNotes>
版本 __VERSION_NUMBER__
如需詳細資訊,請參閱我們的 GitHub 版本頁面
- 我們已重寫主機應用程式在終端機內託管的方式!請報告您遇到的錯誤
- 終端機現在支援 Sixels!
- 現在,您可以開啟包含已儲存命令程式碼片段的固定面板,以供稍後使用
- 最新 Windows 11 版本中的 [命令提示] 使用者可能會看到「快速提示」圖示,建議可自 WinGet 安裝的軟體
- 選取的文字現在會更明顯 (且可自訂!)
- 已修正一些可靠性錯誤、便利性問題和令人困擾的問題。
如需更多詳細資訊,請參閱我們的 GitHub 發行頁面。
</ReleaseNotes>
<ScreenshotCaptions>
<!-- Valid length: 200 character limit, up to 9 elements per platform -->

View File

@@ -56,7 +56,14 @@ Dies ist ein Open Source-Projekt, und wir freuen uns über die Teilnahme an der
<ReleaseNotes>
Version __VERSION_NUMBER__
Weitere Einzelheiten finden Sie auf der Seite der GitHub-Veröffentlichungen.
Terminal speichert jetzt den Inhalt des Fensters, wenn Sie die Sitzungswiederherstellung verwenden.
Sie können jetzt mehrere Schriftarten gleichzeitig verwenden.
Kästchenzeichnende Zeichen werden jetzt pixelgenau gerendert.
Die Verwendung eines IME innerhalb des Terminals wurde erheblich verbessert.
Die Farbschemas in Ihrer JSON-Datei sind jetzt viel einfacher.
Eine Reihe von Fehlern im Zusammenhang mit der URL-Verarbeitung, Zeilen mit doppelter Breite, Zeilenumbruch und mehr wurden behoben.
Weitere Informationen finden Sie auf unserer GitHub-Releaseseite.
</ReleaseNotes>
<ScreenshotCaptions>
<!-- Valid length: 200 character limit, up to 9 elements per platform -->

View File

@@ -56,6 +56,13 @@ This is an open source project and we welcome community participation. To partic
<ReleaseNotes _locID="App_ReleaseNotes">
<!-- _locComment_text="{MaxLength=1500} {Locked=__VERSION_NUMBER__} App Release Note" -->Version __VERSION_NUMBER__
- Terminal will now remember the contents of the window when you use session restoration.
- You can now use multiple fonts at the same time.
- Box-drawing characters are now rendered with pixel perfection.
- The experience of using an IME inside Terminal has been significantly improved.
- The color schemes inside your JSON file will now be much simpler.
- A number of bugs around URL handling, double-width rows, line wrapping, and more have been fixed.
Please see our GitHub releases page for additional details.
</ReleaseNotes>
<ScreenshotCaptions>

View File

@@ -56,7 +56,14 @@ Este es un proyecto de fuente abierta y animamos a la comunidad a participar. Pa
<ReleaseNotes>
Versión __VERSION_NUMBER__
Para más información, consulte nuestra página de versiones de GitHub.
- Terminal recordará ahora el contenido de la ventana cuando use la restauración de la sesión.
- Ahora puede usar varias fuentes al mismo tiempo.
- Los caracteres que dibujan recuadros ahora se representan con precisión de píxel.
- Se ha mejorado significativamente la experiencia de utilizar un IME dentro de Terminal.
- Las combinaciones de colores dentro del archivo JSON ahora serán mucho más sencillas.
- Se han corregido varios errores relacionados con el control de direcciones URL, las filas de ancho doble, el ajuste de líneas y mucho más.
Consulte la página de versiones de GitHub para más información.
</ReleaseNotes>
<ScreenshotCaptions>
<!-- Valid length: 200 character limit, up to 9 elements per platform -->

View File

@@ -56,7 +56,14 @@ Il sagit dun projet open source et nous encourageons la participation à l
<ReleaseNotes>
Version __VERSION_NUMBER__
Consultez la page des versions de GitHub pour plus dinformations.
- Le terminal mémorisera désormais le contenu de la fenêtre lorsque vous utiliserez la restauration de session.
- Vous pouvez désormais utiliser plusieurs polices en même temps.
- Les personnages dessinés en boîte sont désormais rendus avec une perfection de pixel.
- L'expérience d'utilisation d'un IME dans le Terminal a été considérablement améliorée.
- Les schémas de couleurs à l'intérieur de votre fichier JSON seront désormais beaucoup plus simples.
- Un certain nombre de bugs concernant la gestion des URL, les lignes à double largeur, le retour à la ligne, etc. ont été corrigés.
Veuillez consulter notre page de versions GitHub pour plus de détails.
</ReleaseNotes>
<ScreenshotCaptions>
<!-- Valid length: 200 character limit, up to 9 elements per platform -->

View File

@@ -54,9 +54,16 @@ Si tratta di un progetto open source e la partecipazione della community è molt
</DevStudio>
<ReleaseNotes>
Versione __VERSION_NUMBER__
Versione __VERSION_NUMBER__
Per ulteriori dettagli, consulta la nostra pagina delle versioni di GitHub.
- Il terminale ricorda ora il contenuto della finestra quando si usa il ripristino della sessione.
- È ora possibile usare più tipi di carattere contemporaneamente.
- I caratteri tracciati vengono ora sottoposti a rendering con pixel di perfezionamento.
- L'esperienza di utilizzo di un IME all'interno di Terminale è stata notevolmente migliorata.
- Le combinazioni di colori all'interno del file JSON saranno ora molto più semplici.
- Sono stati corretti alcuni bug relativi alla gestione degli URL, alle righe a doppia larghezza, al ritorno a capo delle righe e altro ancora.
Per altri dettagli, vedi la pagina delle versioni di GitHub.
</ReleaseNotes>
<ScreenshotCaptions>
<!-- Valid length: 200 character limit, up to 9 elements per platform -->

View File

@@ -56,7 +56,14 @@
<ReleaseNotes>
バージョン __VERSION_NUMBER__
詳細については、GitHub リリースのページをご覧ください
- セッションの復元を使用すると、ターミナルがウィンドウの内容を記憶するようになりました
- 複数のフォントを同時に使用できるようになりました。
- ボックス描画文字がピクセル単位の精度でレンダリングされるようになりました。
- ターミナル内での IME の使用エクスペリエンスが大幅に改善されました。
- JSON ファイル内の配色がはるかにシンプルになりました。
- URL 処理、二重幅の行、行の折り返しなどに関するいくつかのバグが修正されました。
詳細については、GitHub リリース ページをご覧ください。
</ReleaseNotes>
<ScreenshotCaptions>
<!-- Valid length: 200 character limit, up to 9 elements per platform -->

View File

@@ -56,6 +56,13 @@
<ReleaseNotes>
버전 __VERSION_NUMBER__
- 터미널은 이제 세션 복원을 사용할 때 창의 내용을 기억합니다.
- 이제 여러 글꼴을 동시에 사용할 수 있습니다.
- 상자 그리기 캐릭터가 이제 픽셀 완성도로 렌더링됩니다.
- 터미널 내에서 IME를 사용하는 환경이 크게 개선되었습니다.
- 이제 JSON 파일 내의 색 구성표가 훨씬 더 간단해집니다.
- URL 처리, 이중 너비 행, 줄 바꿈 등과 관련된 여러 버그가 수정되었습니다.
자세한 내용은 GitHub 릴리스 페이지를 참조하세요.
</ReleaseNotes>
<ScreenshotCaptions>

View File

@@ -56,7 +56,14 @@ Este é um projeto de código aberto e a participação da comunidade é bem-vin
<ReleaseNotes>
Versão __VERSION_NUMBER__
Consulte nossa página de lançamentos do GitHub para obter detalhes adicionais.
- O terminal agora se lembra do conteúdo da janela quando você usa a restauração de sessão.
- Agora você pode usar várias fontes ao mesmo tempo.
- Os caracteres da caixa de desenho agora são renderizados com a perfeição de pixels.
- A experiência de usar uma IME dentro do Terminal foi significativamente aprimorada.
- Os esquemas de cores dentro do seu arquivo JSON agora estão muito mais simples.
- Foram corrigidos vários bugs envolvendo o tratamento de URLs, linhas de largura dupla, quebra de linha automática e muito mais.
Confira nossa página de lançamentos no GitHub para obter mais detalhes.
</ReleaseNotes>
<ScreenshotCaptions>
<!-- Valid length: 200 character limit, up to 9 elements per platform -->

View File

@@ -56,7 +56,14 @@
<ReleaseNotes>
Vėѓѕіöй __VERSION_NUMBER__ !!! !!! !
Рļєάśé ѕέę όüґ ĢίŧĦŭв řęļзąѕєš рαġè ƒőŗ äđδĭτíθņâℓ đέтαιľś. !!! !!! !!! !!! !!! !!!
- Ŧēгмíйǻŀ шιļł ñσщ řėmėmвзґ τђз ςоńţëηťŝ σƒ ŧћé ẅιⁿδőщ ẅђеή ýóύ ŭš℮ şεššîóŋ řėşτŏѓдτіόŋ. !!! !!! !!! !!! !!! !!! !!! !!! !!!
- Ύоџ ςàⁿ ŋóώ ũşэ múľŧìφľё ƒоʼnťş àт ťħе ѕâmз тìме. !!! !!! !!! !!! !!!
- Вό×-ðгăшĭиġ ¢ĥаяäςтеřѕ äřę ηоẁ ѓëńđêяεď ẁϊτђ φïжêĺ φėŗƒēςŧΐøй. !!! !!! !!! !!! !!! !!! !
- Ťħέ ĕхφêŕï℮ηĉε ŏƒ ύѕïйġ ǻʼn ÎМË îńšïďê Τєřmíлäļ нαŝ ьēέň ѕιĝήîƒіčäπţŀý ĩмφґθνзđ. !!! !!! !!! !!! !!! !!! !!! !!!
- Ťĥę čöℓοг şçђėmęš ιʼnśΐδê убџѓ ĴŠОИ ƒϊŀε ωĭŀł ʼnθω вз мúçĥ ѕїмρℓёґ. !!! !!! !!! !!! !!! !!! !!
- Á ήũmьéŕ òƒ вµġŝ άřòūñδ ÛҐĿ ħàŋδľįйģ, ðőџъŀε-ŵĭďτђ ŗōẁš, ŀϊπė ẃяąрρΐηğ, âⁿđ мŏř℮ ĥāνě везŋ ƒï×έð. !!! !!! !!! !!! !!! !!! !!! !!! !!! !!!
Ρļēªšê ŝέė őůг ĜīтĤųъ яëŀεäśēś рдġэ ƒõя ãδðìτϊöňãł δèτâĩĺѕ. !!! !!! !!! !!! !!! !!!
</ReleaseNotes>
<ScreenshotCaptions>
<!-- Valid length: 200 character limit, up to 9 elements per platform -->

View File

@@ -56,7 +56,14 @@
<ReleaseNotes>
Vėѓѕіöй __VERSION_NUMBER__ !!! !!! !
Рļєάśé ѕέę όüґ ĢίŧĦŭв řęļзąѕєš рαġè ƒőŗ äđδĭτíθņâℓ đέтαιľś. !!! !!! !!! !!! !!! !!!
- Ŧēгмíйǻŀ шιļł ñσщ řėmėmвзґ τђз ςоńţëηťŝ σƒ ŧћé ẅιⁿδőщ ẅђеή ýóύ ŭš℮ şεššîóŋ řėşτŏѓдτіόŋ. !!! !!! !!! !!! !!! !!! !!! !!! !!!
- Ύоџ ςàⁿ ŋóώ ũşэ múľŧìφľё ƒоʼnťş àт ťħе ѕâmз тìме. !!! !!! !!! !!! !!!
- Вό×-ðгăшĭиġ ¢ĥаяäςтеřѕ äřę ηоẁ ѓëńđêяεď ẁϊτђ φïжêĺ φėŗƒēςŧΐøй. !!! !!! !!! !!! !!! !!! !
- Ťħέ ĕхφêŕï℮ηĉε ŏƒ ύѕïйġ ǻʼn ÎМË îńšïďê Τєřmíлäļ нαŝ ьēέň ѕιĝήîƒіčäπţŀý ĩмφґθνзđ. !!! !!! !!! !!! !!! !!! !!! !!!
- Ťĥę čöℓοг şçђėmęš ιʼnśΐδê убџѓ ĴŠОИ ƒϊŀε ωĭŀł ʼnθω вз мúçĥ ѕїмρℓёґ. !!! !!! !!! !!! !!! !!! !!
- Á ήũmьéŕ òƒ вµġŝ άřòūñδ ÛҐĿ ħàŋδľįйģ, ðőџъŀε-ŵĭďτђ ŗōẁš, ŀϊπė ẃяąрρΐηğ, âⁿđ мŏř℮ ĥāνě везŋ ƒï×έð. !!! !!! !!! !!! !!! !!! !!! !!! !!! !!!
Ρļēªšê ŝέė őůг ĜīтĤųъ яëŀεäśēś рдġэ ƒõя ãδðìτϊöňãł δèτâĩĺѕ. !!! !!! !!! !!! !!! !!!
</ReleaseNotes>
<ScreenshotCaptions>
<!-- Valid length: 200 character limit, up to 9 elements per platform -->

View File

@@ -56,7 +56,14 @@
<ReleaseNotes>
Vėѓѕіöй __VERSION_NUMBER__ !!! !!! !
Рļєάśé ѕέę όüґ ĢίŧĦŭв řęļзąѕєš рαġè ƒőŗ äđδĭτíθņâℓ đέтαιľś. !!! !!! !!! !!! !!! !!!
- Ŧēгмíйǻŀ шιļł ñσщ řėmėmвзґ τђз ςоńţëηťŝ σƒ ŧћé ẅιⁿδőщ ẅђеή ýóύ ŭš℮ şεššîóŋ řėşτŏѓдτіόŋ. !!! !!! !!! !!! !!! !!! !!! !!! !!!
- Ύоџ ςàⁿ ŋóώ ũşэ múľŧìφľё ƒоʼnťş àт ťħе ѕâmз тìме. !!! !!! !!! !!! !!!
- Вό×-ðгăшĭиġ ¢ĥаяäςтеřѕ äřę ηоẁ ѓëńđêяεď ẁϊτђ φïжêĺ φėŗƒēςŧΐøй. !!! !!! !!! !!! !!! !!! !
- Ťħέ ĕхφêŕï℮ηĉε ŏƒ ύѕïйġ ǻʼn ÎМË îńšïďê Τєřmíлäļ нαŝ ьēέň ѕιĝήîƒіčäπţŀý ĩмφґθνзđ. !!! !!! !!! !!! !!! !!! !!! !!!
- Ťĥę čöℓοг şçђėmęš ιʼnśΐδê убџѓ ĴŠОИ ƒϊŀε ωĭŀł ʼnθω вз мúçĥ ѕїмρℓёґ. !!! !!! !!! !!! !!! !!! !!
- Á ήũmьéŕ òƒ вµġŝ άřòūñδ ÛҐĿ ħàŋδľįйģ, ðőџъŀε-ŵĭďτђ ŗōẁš, ŀϊπė ẃяąрρΐηğ, âⁿđ мŏř℮ ĥāνě везŋ ƒï×έð. !!! !!! !!! !!! !!! !!! !!! !!! !!! !!!
Ρļēªšê ŝέė őůг ĜīтĤųъ яëŀεäśēś рдġэ ƒõя ãδðìτϊöňãł δèτâĩĺѕ. !!! !!! !!! !!! !!! !!!
</ReleaseNotes>
<ScreenshotCaptions>
<!-- Valid length: 200 character limit, up to 9 elements per platform -->

View File

@@ -56,7 +56,14 @@
<ReleaseNotes>
Версия __VERSION_NUMBER__
Дополнительные сведения см. на странице «Выпуски GitHub».
Терминал теперь будет запоминать содержимое окна при восстановлении сеанса.
Теперь вы можете использовать несколько шрифтов одновременно.
Символы псевдографики теперь отрисовываются с пиксельной точностью.
Значительно улучшена возможность использования IME внутри Терминала.
Цветовые схемы в JSON-файле теперь будут намного проще.
Исправлено несколько ошибок в обработке URL-адресов, строках двойной ширины, переносе строк и т. д.
Дополнительные сведения см. на странице выпусков GitHub.
</ReleaseNotes>
<ScreenshotCaptions>
<!-- Valid length: 200 character limit, up to 9 elements per platform -->

View File

@@ -54,7 +54,14 @@
</DevStudio>
<ReleaseNotes>
版本 __VERSION_NUMBER__
Version __VERSION_NUMBER__
- 现在,使用会话还原时,终端将记住窗口的内容。
- 现在可以同时使用多种字体。
- 现在以像素为单位呈现框绘图字符。
- 在终端内使用输入法的体验已得到显著提升。
- JSON 文件中的配色方案现在要简单得多。
- 已修复有关 URL 处理、双倍行宽、换行等大量 bug。
有关其他详细信息,请参阅我们的 GitHub 发布页面。
</ReleaseNotes>

View File

@@ -56,7 +56,14 @@
<ReleaseNotes>
版本 __VERSION_NUMBER__
如需詳細資訊,請參閱我們的 GitHub 版本頁面
- 當您使用工作階段還原時,終端機現在會記住視窗的內容
- 現在您可以同時使用多個字型。
- 製表格圖字元現在會以完美像素模式呈現。
- 在終端機內使用 IME 的體驗已大幅改善。
- JSON 檔案內的色彩配置現在將變得更簡單了。
- 已修正一些 URL 處理、雙寬度列、換行等相關錯誤。
如需更多詳細資訊,請參閱我們的 GitHub 發行頁面。
</ReleaseNotes>
<ScreenshotCaptions>
<!-- Valid length: 200 character limit, up to 9 elements per platform -->

View File

@@ -1,6 +1,6 @@
{
"instanceUrl": "https://microsoft.visualstudio.com",
"projectName": "OS",
"areaPath": "OS\\Windows Client and Services\\ADEPT\\E4D-Engineered for Developers\\SHINE\\Terminal",
"areaPath": "OS\\Windows Client and Services\\WinPD\\DEEP-Developer Experience, Ecosystem and Partnerships\\SHINE\\Terminal",
"notificationAliases": ["condev@microsoft.com", "duhowett@microsoft.com"]
}

View File

@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="MUXCustomBuildTasks" version="1.0.48" targetFramework="native" />
<package id="Microsoft.Taef" version="10.60.210621002" targetFramework="native" />
<package id="Microsoft.Taef" version="10.93.240607003" targetFramework="native" />
<package id="Microsoft.Internal.PGO-Helpers.Cpp" version="0.2.34" targetFramework="native" />
<package id="Microsoft.Debugging.Tools.PdbStr" version="20220617.1556.0" targetFramework="native" />
<package id="Microsoft.Debugging.Tools.SrcTool" version="20220617.1556.0" targetFramework="native" />

View File

@@ -28,7 +28,7 @@ extends:
official: true
branding: Canary
buildTerminal: true
pgoBuildMode: Optimize
pgoBuildMode: None # BODGY - OneBranch is on VS 17.10, which is known to be the worst
codeSign: true
signingIdentity:
serviceName: $(SigningServiceName)

View File

@@ -27,7 +27,7 @@ parameters:
- name: pgoBuildMode
displayName: "PGO Build Mode"
type: string
default: Optimize
default: None # BODGY - OneBranch is on VS 17.10, which is known to be the worst
values:
- Optimize
- Instrument

View File

@@ -59,10 +59,7 @@ jobs:
submodules: true
persistCredentials: True
- task: PkgESSetupBuild@12
displayName: Package ES - Setup Build
inputs:
disableOutputRedirect: true
- template: steps-setup-versioning.yml
- template: steps-download-bin-dir-artifact.yml
parameters:

View File

@@ -10,6 +10,6 @@ jobs:
submodules: false
clean: true
- powershell: |-
- pwsh: |-
.\build\scripts\Invoke-FormattingCheck.ps1
displayName: 'Run formatters'

View File

@@ -69,10 +69,9 @@ jobs:
fetchTags: false # Tags still result in depth > 1 fetch; we don't need them here
submodules: true
persistCredentials: True
- task: PkgESSetupBuild@12
displayName: Package ES - Setup Build
inputs:
disableOutputRedirect: true
- template: steps-setup-versioning.yml
- template: steps-download-bin-dir-artifact.yml
parameters:
buildPlatforms: ${{ parameters.buildPlatforms }}

View File

@@ -57,10 +57,7 @@ jobs:
submodules: true
persistCredentials: True
- task: PkgESSetupBuild@12
displayName: Package ES - Setup Build
inputs:
disableOutputRedirect: true
- template: steps-setup-versioning.yml
- template: steps-download-bin-dir-artifact.yml
parameters:

View File

@@ -44,10 +44,7 @@ jobs:
submodules: true
persistCredentials: True
- task: PkgESSetupBuild@12
displayName: Package ES - Setup Build
inputs:
disableOutputRedirect: true
- template: steps-setup-versioning.yml
- task: DownloadPipelineArtifact@2
displayName: Download all PDBs from all prior build phases

View File

@@ -43,10 +43,7 @@ jobs:
submodules: true
persistCredentials: True
- task: PkgESSetupBuild@12
displayName: Package ES - Setup Build
inputs:
disableOutputRedirect: true
- template: steps-setup-versioning.yml
- task: DownloadPipelineArtifact@2
displayName: Download all PDBs from all prior build phases

View File

@@ -38,10 +38,7 @@ jobs:
submodules: true
persistCredentials: True
- task: PkgESSetupBuild@12
displayName: Package ES - Setup Build
inputs:
disableOutputRedirect: true
- template: steps-setup-versioning.yml
- task: DownloadPipelineArtifact@2
displayName: Download MSIX Bundle Artifact

View File

@@ -92,10 +92,7 @@ stages:
generateSbom: ${{ parameters.generateSbom }}
codeSign: ${{ parameters.codeSign }}
beforeBuildSteps: # Right before we build, lay down the universal package and localizations
- task: PkgESSetupBuild@12
displayName: Package ES - Setup Build
inputs:
disableOutputRedirect: true
- template: ./build/pipelines/templates-v2/steps-setup-versioning.yml@self
- task: UniversalPackages@0
displayName: Download terminal-internal Universal Package
@@ -119,10 +116,7 @@ stages:
generateSbom: ${{ parameters.generateSbom }}
codeSign: ${{ parameters.codeSign }}
beforeBuildSteps:
- task: PkgESSetupBuild@12
displayName: Package ES - Setup Build
inputs:
disableOutputRedirect: true
- template: ./build/pipelines/templates-v2/steps-setup-versioning.yml@self
# WPF doesn't need the localizations or the universal package, but if it does... put them here.
- stage: Package

View File

@@ -130,10 +130,7 @@ extends:
codeSign: ${{ parameters.codeSign }}
signingIdentity: ${{ parameters.signingIdentity }}
beforeBuildSteps: # Right before we build, lay down the universal package and localizations
- task: PkgESSetupBuild@12
displayName: Package ES - Setup Build
inputs:
disableOutputRedirect: true
- template: ./build/pipelines/templates-v2/steps-setup-versioning.yml@self
- task: UniversalPackages@0
displayName: Download terminal-internal Universal Package
@@ -167,10 +164,7 @@ extends:
codeSign: ${{ parameters.codeSign }}
signingIdentity: ${{ parameters.signingIdentity }}
beforeBuildSteps:
- task: PkgESSetupBuild@12
displayName: Package ES - Setup Build
inputs:
disableOutputRedirect: true
- template: ./build/pipelines/templates-v2/steps-setup-versioning.yml@self
# WPF doesn't need the localizations or the universal package, but if it does... put them here.
- stage: Package

View File

@@ -0,0 +1,6 @@
steps:
- pwsh: |-
nuget install Microsoft.Windows.Terminal.Versioning -OutputDirectory _versioning
$VersionRoot = (Get-Item _versioning\Microsoft.Windows.*).FullName
& "$VersionRoot\build\Setup.ps1" -ProjectDirectory "$(Build.SourcesDirectory)" -Verbose
displayName: Set up versioning via M.W.T.V

View File

@@ -0,0 +1,22 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT License. See LICENSE in the project root for license information. -->
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Native-Platform Condition="'$(Platform)' == 'Win32'">x86</Native-Platform>
<Native-Platform Condition="'$(Platform)' != 'Win32'">$(Platform)</Native-Platform>
</PropertyGroup>
<ItemGroup>
<Reference Include="$(WinGetPackageRoot)\lib\Microsoft.Management.Deployment.winmd">
<IsWinMDFile>true</IsWinMDFile>
</Reference>
</ItemGroup>
<Target Name="_FixWinGetWinmdPackaging" BeforeTargets="_ComputeAppxPackagePayload">
<ItemGroup>
<PackagingOutputs Include="$(WinGetPackageRoot)\lib\Microsoft.Management.Deployment.winmd">
<OutputGroup>CustomOutputGroupForPackaging</OutputGroup>
<ProjectName>$(ProjectName)</ProjectName>
<TargetPath>Microsoft.Management.Deployment.winmd</TargetPath>
</PackagingOutputs>
</ItemGroup>
</Target>
</Project>

View File

@@ -5,7 +5,7 @@
<XesUseOneStoreVersioning>true</XesUseOneStoreVersioning>
<XesBaseYearForStoreVersion>2024</XesBaseYearForStoreVersion>
<VersionMajor>1</VersionMajor>
<VersionMinor>22</VersionMinor>
<VersionMinor>23</VersionMinor>
<VersionInfoProductName>Windows Terminal</VersionInfoProductName>
</PropertyGroup>
</Project>

View File

@@ -3,13 +3,14 @@
<packages>
<!-- Native packages -->
<package id="Microsoft.Internal.PGO-Helpers.Cpp" version="0.2.34" targetFramework="native" />
<package id="Microsoft.Taef" version="10.60.210621002" targetFramework="native" />
<package id="Microsoft.Taef" version="10.93.240607003" targetFramework="native" />
<package id="Microsoft.Windows.CppWinRT" version="2.0.230207.1" targetFramework="native" />
<package id="Microsoft.Internal.Windows.Terminal.ThemeHelpers" version="0.7.230706001" targetFramework="native" />
<package id="Microsoft.VisualStudio.Setup.Configuration.Native" version="2.3.2262" targetFramework="native" developmentDependency="true" />
<package id="Microsoft.UI.Xaml" version="2.8.4" targetFramework="native" />
<package id="Microsoft.Web.WebView2" version="1.0.1661.34" targetFramework="native" />
<package id="Microsoft.Windows.ImplementationLibrary" version="1.0.240122.1" targetFramework="native" developmentDependency="true" />
<package id="Microsoft.WindowsPackageManager.ComInterop" version="1.8.1911" targetFramework="native" developmentDependency="true" />
<!-- Managed packages -->
<package id="Appium.WebDriver" version="3.0.0.2" targetFramework="net45" />

View File

@@ -618,6 +618,11 @@
"type": "boolean",
"default": false,
"description": "This will override the profile's `elevate` setting."
},
"reloadEnvironmentVariables": {
"type": "boolean",
"default": true,
"description": "When set to true, a new environment block will be generated when creating a new session. Otherwise, the session will inherit the variables the Terminal was started with."
}
},
"type": "object"
@@ -728,6 +733,9 @@
"type": "string",
"default": "",
"description": "The name or GUID of the profile to show in this entry"
},
"icon": {
"$ref": "#/$defs/Icon"
}
}
}
@@ -799,6 +807,9 @@
"type": "string",
"default": "",
"description": "The ID of the action to show in this entry"
},
"icon": {
"$ref": "#/$defs/Icon"
}
}
}
@@ -874,6 +885,11 @@
"default": false,
"description": "If true, the copied content will be copied as a single line (even if there are hard line breaks present in the text). If false, newlines persist from the selected text."
},
"withControlSequences": {
"type": "boolean",
"default": false,
"description": "If true, copied content will contain ANSI escape code control sequences representing the styling of the content."
},
"dismissSelection": {
"type": "boolean",
"default": true,
@@ -2335,7 +2351,7 @@
"description": "When set to `true`, the terminal window will auto-center itself on the display it opens on. The terminal will use the \"initialPosition\" to determine which display to open on.",
"type": "boolean"
},
"inputServiceWarning": {
"warning.inputService": {
"default": true,
"description": "Warning if 'Touch Keyboard and Handwriting Panel Service' is disabled.",
"type": "boolean"
@@ -2350,11 +2366,21 @@
"description": "When set to true, the terminal will focus the pane on mouse hover.",
"type": "boolean"
},
"compatibility.allowHeadless": {
"default": false,
"description": "When set to true, Windows Terminal will run in the background. This allows globalSummon and quakeMode actions to work even when no windows are open.",
"type": "boolean"
},
"compatibility.isolatedMode": {
"default": false,
"description": "When set to true, Terminal windows will not be able to interact with each other (including global hotkeys, tab drag/drop, running commandlines in existing windows, etc.). This is a compatibility escape hatch for users who are running into certain windowing issues.",
"type": "boolean"
},
"compatibility.allowDECRQCRA": {
"default": false,
"description": "When set to true, the terminal will support the DECRQCRA (Request Checksum of Rectangular Area) escape sequence.",
"type": "boolean"
},
"copyFormatting": {
"default": true,
"description": "When set to `true`, the color and font formatting of selected text is also copied to your clipboard. When set to `false`, only plain text is copied to your clipboard. An array of specific formats can also be used. Supported array values include `html` and `rtf`. Plain text is always copied.",
@@ -2385,12 +2411,12 @@
"description": "When set to `true`, visual animations will be disabled across the application.",
"type": "boolean"
},
"largePasteWarning": {
"warning.largePaste": {
"default": true,
"description": "When set to true, trying to paste text with more than 5 KiB of characters will display a warning asking you whether to continue or not with the paste.",
"type": "boolean"
},
"multiLinePasteWarning": {
"warning.multiLinePaste": {
"default": true,
"description": "When set to true, trying to paste text with a \"new line\" character will display a warning asking you whether to continue or not with the paste.",
"type": "boolean"
@@ -2588,7 +2614,7 @@
"description": "Determines the delimiters used in a double click selection.",
"type": "string"
},
"confirmCloseAllTabs": {
"warning.confirmCloseAllTabs": {
"default": true,
"description": "When set to \"true\" closing a window with multiple tabs open will require confirmation. When set to \"false\", the confirmation dialog will not appear.",
"type": "boolean"
@@ -2850,7 +2876,7 @@
}
},
"autoMarkPrompts": {
"default": false,
"default": true,
"description": "When set to true, prompts will automatically be marked.",
"type": "boolean"
},
@@ -3074,6 +3100,17 @@
"default": false,
"description": "When set to true, the window will have an acrylic material background. When set to false, the window will have a plain, untextured background.",
"type": "boolean"
},
"pathTranslationStyle": {
"default": "none",
"description": "Controls how file paths are transformed when they are dragged and dropped on the terminal. Possible values are \"none\", \"wsl\", \"cygwin\" and \"msys2\".",
"enum": [
"none",
"wsl",
"cygwin",
"msys2"
],
"type": "string"
}
}
},

View File

@@ -0,0 +1,28 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- (c) 2024 Microsoft Corporation -->
<policyDefinitions xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" revision="1.0" schemaVersion="1.0" xmlns="http://schemas.microsoft.com/GroupPolicy/2006/07/PolicyDefinitions">
<policyNamespaces>
<target prefix="terminal" namespace="Microsoft.Policies.WindowsTerminal" />
<using prefix="windows" namespace="Microsoft.Policies.Windows" />
</policyNamespaces>
<resources minRequiredRevision="1.0" />
<supportedOn>
<definitions>
<definition name="SUPPORTED_WindowsTerminal_1_21" displayName="$(string.SUPPORTED_WindowsTerminal_1_21)" />
</definitions>
</supportedOn>
<categories>
<category name="WindowsTerminal" displayName="$(string.WindowsTerminal)">
<parentCategory ref="windows:WindowsComponents" />
</category>
</categories>
<policies>
<policy name="DisabledProfileSources" class="Both" displayName="$(string.DisabledProfileSources)" explainText="$(string.DisabledProfileSourcesText)" presentation="$(presentation.DisabledProfileSources)" key="Software\Policies\Microsoft\Windows Terminal">
<parentCategory ref="WindowsTerminal" />
<supportedOn ref="SUPPORTED_WindowsTerminal_1_21" />
<elements>
<multiText id="DisabledProfileSources" valueName="DisabledProfileSources" required="true" />
</elements>
</policy>
</policies>
</policyDefinitions>

View File

@@ -0,0 +1,28 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- (c) 2024 Microsoft Corporation -->
<policyDefinitionResources xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" revision="1.0" schemaVersion="1.0" xmlns="http://schemas.microsoft.com/GroupPolicy/2006/07/PolicyDefinitions">
<displayName>Windows Terminal</displayName>
<description>Windows Terminal</description>
<resources>
<stringTable>
<string id="WindowsTerminal">Windows Terminal</string>
<string id="SUPPORTED_WindowsTerminal_1_21">At least Windows Terminal 1.21</string>
<string id="DisabledProfileSources">Disabled Profile Sources</string>
<string id="DisabledProfileSourcesText">Profiles will not be generated from any sources listed here. Source names can be arbitrary strings. Potential candidates can be found as the "source" property on profile definitions in Windows Terminal's settings.json file.
Common sources are:
- Windows.Terminal.Azure
- Windows.Terminal.PowershellCore
- Windows.Terminal.Wsl
For instance, setting this policy to Windows.Terminal.Wsl will disable the builtin WSL integration of Windows Terminal.
Note: Existing profiles will disappear from Windows Terminal after adding their source to this policy.</string>
</stringTable>
<presentationTable>
<presentation id="DisabledProfileSources">
<multiTextBox refId="DisabledProfileSources">List of disabled sources (one per line)</multiTextBox>
</presentation>
</presentationTable>
</resources>
</policyDefinitionResources>

View File

@@ -65,7 +65,6 @@ RGBQUAD* ImageSlice::MutablePixels(const til::CoordType columnBegin, const til::
_columnBegin = existingData ? std::min(_columnBegin, columnBegin) : columnBegin;
_columnEnd = existingData ? std::max(_columnEnd, columnEnd) : columnEnd;
_pixelWidth = (_columnEnd - _columnBegin) * _cellSize.width;
_pixelWidth = (_pixelWidth + 3) & ~3; // Renderer needs this as a multiple of 4
const auto bufferSize = _pixelWidth * _cellSize.height;
if (existingData)
{

View File

@@ -9,6 +9,10 @@
#include "../../types/inc/convert.hpp"
#include "../../inc/conattrs.hpp"
// BODGY: Misdiagnosis in MSVC 17.11: Referencing global constants in the member
// initializer list leads to this warning. Can probably be removed in the future.
#pragma warning(disable : 26493) // Don't use C-style casts (type.4).)
static constexpr TextAttribute InvalidTextAttribute{ INVALID_COLOR, INVALID_COLOR };
OutputCell::OutputCell() noexcept :

View File

@@ -11,6 +11,10 @@
#include "../../types/inc/GlyphWidth.hpp"
#include "../../inc/conattrs.hpp"
// BODGY: Misdiagnosis in MSVC 17.11: Referencing global constants in the member
// initializer list leads to this warning. Can probably be removed in the future.
#pragma warning(disable : 26493) // Don't use C-style casts (type.4).)
static constexpr TextAttribute InvalidTextAttribute{ INVALID_COLOR, INVALID_COLOR, INVALID_COLOR };
// Routine Description:
@@ -274,7 +278,7 @@ OutputCellIterator& OutputCellIterator::operator++()
}
case Mode::CharInfo:
{
// Walk forward by one because charinfos are just the legacy version of cells and prealigned to columns
// Walk forward by one because char infos are just the legacy version of cells and prealigned to columns
_pos++;
if (operator bool())
{

View File

@@ -5,6 +5,10 @@
#include "OutputCellView.hpp"
// BODGY: Misdiagnosis in MSVC 17.11: Referencing global constants in the member
// initializer list leads to this warning. Can probably be removed in the future.
#pragma warning(disable : 26493) // Don't use C-style casts (type.4).)
// Routine Description:
// - Constructs a read-only view of data formatted as a single output buffer cell
// Arguments:

View File

@@ -82,7 +82,8 @@ public:
static constexpr size_t FRAME_FOREGROUND = 263;
static constexpr size_t FRAME_BACKGROUND = 264;
static constexpr size_t CURSOR_COLOR = 265;
static constexpr size_t TABLE_SIZE = 266;
static constexpr size_t SELECTION_BACKGROUND = 266;
static constexpr size_t TABLE_SIZE = 267;
constexpr TextColor() noexcept :
_meta{ ColorType::IsDefault },

View File

@@ -16,7 +16,7 @@ bool Search::IsStale(const Microsoft::Console::Render::IRenderData& renderData,
_lastMutationId != renderData.GetTextBuffer().GetLastMutationId();
}
bool Search::Reset(Microsoft::Console::Render::IRenderData& renderData, const std::wstring_view& needle, SearchFlag flags, bool reverse)
void Search::Reset(Microsoft::Console::Render::IRenderData& renderData, const std::wstring_view& needle, SearchFlag flags, bool reverse)
{
const auto& textBuffer = renderData.GetTextBuffer();
@@ -30,15 +30,15 @@ bool Search::Reset(Microsoft::Console::Render::IRenderData& renderData, const st
_results = std::move(result).value_or(std::vector<til::point_span>{});
_index = reverse ? gsl::narrow_cast<ptrdiff_t>(_results.size()) - 1 : 0;
_step = reverse ? -1 : 1;
return true;
}
void Search::MoveToCurrentSelection()
{
if (_renderData->IsSelectionActive())
{
MoveToPoint(_renderData->GetTextBuffer().ScreenToBufferPosition(_renderData->GetSelectionAnchor()));
}
else if (const auto span = _renderData->GetSearchHighlightFocused())
{
MoveToPoint(_step > 0 ? span->start : span->end);
}
}
void Search::MoveToPoint(const til::point anchor) noexcept

View File

@@ -36,9 +36,8 @@ public:
Search() = default;
bool IsStale(const Microsoft::Console::Render::IRenderData& renderData, const std::wstring_view& needle, SearchFlag flags) const noexcept;
bool Reset(Microsoft::Console::Render::IRenderData& renderData, const std::wstring_view& needle, SearchFlag flags, bool reverse);
void Reset(Microsoft::Console::Render::IRenderData& renderData, const std::wstring_view& needle, SearchFlag flags, bool reverse);
void MoveToCurrentSelection();
void MoveToPoint(til::point anchor) noexcept;
void MovePastPoint(til::point anchor) noexcept;
void FindNext(bool reverse) noexcept;

View File

@@ -12,6 +12,10 @@
#include "../types/inc/utils.hpp"
#include "search.h"
// BODGY: Misdiagnosis in MSVC 17.11: Referencing global constants in the member
// initializer list leads to this warning. Can probably be removed in the future.
#pragma warning(disable : 26493) // Don't use C-style casts (type.4).)
using namespace Microsoft::Console;
using namespace Microsoft::Console::Types;
@@ -447,14 +451,9 @@ size_t TextBuffer::FitTextIntoColumns(const std::wstring_view& chars, til::Coord
cwd.GraphemeNext(state, chars);
col += state.width;
// If we ran out of columns, we need to always return `columnLimit` and not `cols`,
// because if we tried inserting a wide glyph into just 1 remaining column it will
// fail to fit, but that remaining column still has been used up. When the caller sees
// `columns == columnLimit` they will line-wrap and continue inserting into the next row.
if (col > columnLimit)
{
columns = columnLimit;
return dist;
break;
}
dist += state.len;
@@ -462,7 +461,7 @@ size_t TextBuffer::FitTextIntoColumns(const std::wstring_view& chars, til::Coord
// But if we simply ran out of text we just need to return the actual number of columns.
columns = col;
return chars.size();
return dist;
}
// Pretend as if `position` is a regular cursor in the TextBuffer.
@@ -1918,6 +1917,41 @@ std::wstring TextBuffer::GetPlainText(const CopyRequest& req) const
return selectedText;
}
// Retrieves the text data from the buffer *with* ANSI escape code control sequences and presents it in
// a clipboard-ready format.
// Arguments:
// - req - the copy request having the bounds of the selected region and other related configuration flags.
// Return Value:
// - The text and control sequence data from the selected region of the text buffer. Empty if the copy request
// is invalid.
std::wstring TextBuffer::GetWithControlSequences(const CopyRequest& req) const
{
if (req.beg > req.end)
{
return {};
}
std::wstring selectedText;
std::optional<TextAttribute> previousTextAttr;
bool delayedLineBreak = false;
const auto firstRow = req.beg.y;
const auto lastRow = req.end.y;
for (til::CoordType currentRow = firstRow; currentRow <= lastRow; currentRow++)
{
const auto& row = GetRowByOffset(currentRow);
const auto [startX, endX, reqAddLineBreak] = _RowCopyHelper(req, currentRow, row);
const bool isLastRow = currentRow == lastRow;
const bool addLineBreak = reqAddLineBreak && !isLastRow;
_SerializeRow(row, startX, endX, addLineBreak, isLastRow, selectedText, previousTextAttr, delayedLineBreak);
}
return selectedText;
}
// Routine Description:
// - Generates a CF_HTML compliant structure from the selected region of the buffer
// Arguments:
@@ -2349,7 +2383,7 @@ void TextBuffer::_AppendRTFText(std::string& contentBuilder, const std::wstring_
}
}
void TextBuffer::Serialize(const wchar_t* destination) const
void TextBuffer::SerializeToPath(const wchar_t* destination) const
{
const wil::unique_handle file{ CreateFileW(destination, GENERIC_WRITE, FILE_SHARE_READ | FILE_SHARE_DELETE, nullptr, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, nullptr) };
THROW_LAST_ERROR_IF(!file);
@@ -2359,268 +2393,26 @@ void TextBuffer::Serialize(const wchar_t* destination) const
buffer.reserve(writeThreshold + writeThreshold / 2);
buffer.push_back(L'\uFEFF');
const til::CoordType lastRowWithText = GetLastNonSpaceCharacter(nullptr).y;
CharacterAttributes previousAttr = CharacterAttributes::Unused1;
TextColor previousFg;
TextColor previousBg;
TextColor previousUl;
uint16_t previousHyperlinkId = 0;
std::optional<TextAttribute> previousTextAttr;
bool delayedLineBreak = false;
const til::CoordType firstRow = 0;
const til::CoordType lastRow = GetLastNonSpaceCharacter(nullptr).y;
// This iterates through each row. The exit condition is at the end
// of the for() loop so that we can properly handle file flushing.
for (til::CoordType currentRow = 0;; currentRow++)
for (til::CoordType currentRow = firstRow;; currentRow++)
{
const auto& row = GetRowByOffset(currentRow);
if (const auto lr = row.GetLineRendition(); lr != LineRendition::SingleWidth)
{
static constexpr std::wstring_view mappings[] = {
L"\x1b#6", // LineRendition::DoubleWidth
L"\x1b#3", // LineRendition::DoubleHeightTop
L"\x1b#4", // LineRendition::DoubleHeightBottom
};
const auto idx = std::clamp(static_cast<int>(lr) - 1, 0, 2);
buffer.append(til::at(mappings, idx));
}
const auto isLastRow = currentRow == lastRow;
const auto startX = 0;
const auto endX = row.GetReadableColumnCount();
const bool addLineBreak = !row.WasWrapForced() || isLastRow;
const auto& runs = row.Attributes().runs();
const auto beg = runs.begin();
const auto end = runs.end();
auto it = beg;
const auto last = end - 1;
const auto lastCharX = row.MeasureRight();
til::CoordType oldX = 0;
_SerializeRow(row, startX, endX, addLineBreak, isLastRow, buffer, previousTextAttr, delayedLineBreak);
for (; it != end; ++it)
{
const auto attr = it->value.GetCharacterAttributes();
const auto hyperlinkId = it->value.GetHyperlinkId();
const auto fg = it->value.GetForeground();
const auto bg = it->value.GetBackground();
const auto ul = it->value.GetUnderlineColor();
if (previousAttr != attr)
{
auto attrDelta = attr ^ previousAttr;
// There's no escape sequence that only turns off either bold/intense or dim/faint. SGR 22 turns off both.
// This results in two issues in our generic "Mapping" code below. Assuming, both Intense and Faint were on...
// * ...and either turned off, it would emit SGR 22 which turns both attributes off = Wrong.
// * ...and both are now off, it would emit SGR 22 twice.
//
// This extra branch takes care of both issues. If both attributes turned off it'll emit a single \x1b[22m,
// if faint turned off \x1b[22;1m (intense is still on), and \x1b[22;2m if intense turned off (vice versa).
if (WI_AreAllFlagsSet(previousAttr, CharacterAttributes::Intense | CharacterAttributes::Faint) &&
WI_IsAnyFlagSet(attrDelta, CharacterAttributes::Intense | CharacterAttributes::Faint))
{
wchar_t buf[8] = L"\x1b[22m";
size_t len = 5;
if (WI_IsAnyFlagSet(attr, CharacterAttributes::Intense | CharacterAttributes::Faint))
{
buf[4] = L';';
buf[5] = WI_IsAnyFlagSet(attr, CharacterAttributes::Intense) ? L'1' : L'2';
buf[6] = L'm';
len = 7;
}
buffer.append(&buf[0], len);
WI_ClearAllFlags(attrDelta, CharacterAttributes::Intense | CharacterAttributes::Faint);
}
{
struct Mapping
{
CharacterAttributes attr;
uint8_t change[2]; // [0] = off, [1] = on
};
static constexpr Mapping mappings[] = {
{ CharacterAttributes::Intense, { 22, 1 } },
{ CharacterAttributes::Italics, { 23, 3 } },
{ CharacterAttributes::Blinking, { 25, 5 } },
{ CharacterAttributes::Invisible, { 28, 8 } },
{ CharacterAttributes::CrossedOut, { 29, 9 } },
{ CharacterAttributes::Faint, { 22, 2 } },
{ CharacterAttributes::TopGridline, { 55, 53 } },
{ CharacterAttributes::ReverseVideo, { 27, 7 } },
};
for (const auto& mapping : mappings)
{
if (WI_IsAnyFlagSet(attrDelta, mapping.attr))
{
const auto n = til::at(mapping.change, WI_IsAnyFlagSet(attr, mapping.attr));
fmt::format_to(std::back_inserter(buffer), FMT_COMPILE(L"\x1b[{}m"), n);
}
}
}
if (WI_IsAnyFlagSet(attrDelta, CharacterAttributes::UnderlineStyle))
{
static constexpr std::wstring_view mappings[] = {
L"\x1b[24m", // UnderlineStyle::NoUnderline
L"\x1b[4m", // UnderlineStyle::SinglyUnderlined
L"\x1b[21m", // UnderlineStyle::DoublyUnderlined
L"\x1b[4:3m", // UnderlineStyle::CurlyUnderlined
L"\x1b[4:4m", // UnderlineStyle::DottedUnderlined
L"\x1b[4:5m", // UnderlineStyle::DashedUnderlined
};
auto idx = WI_EnumValue(it->value.GetUnderlineStyle());
if (idx >= std::size(mappings))
{
idx = 1; // UnderlineStyle::SinglyUnderlined
}
buffer.append(til::at(mappings, idx));
}
previousAttr = attr;
}
if (previousFg != fg)
{
switch (fg.GetType())
{
case ColorType::IsDefault:
buffer.append(L"\x1b[39m");
break;
case ColorType::IsIndex16:
{
uint8_t index = WI_IsFlagSet(fg.GetIndex(), 8) ? 90 : 30;
index += fg.GetIndex() & 7;
fmt::format_to(std::back_inserter(buffer), FMT_COMPILE(L"\x1b[{}m"), index);
break;
}
case ColorType::IsIndex256:
fmt::format_to(std::back_inserter(buffer), FMT_COMPILE(L"\x1b[38;5;{}m"), fg.GetIndex());
break;
case ColorType::IsRgb:
fmt::format_to(std::back_inserter(buffer), FMT_COMPILE(L"\x1b[38;2;{};{};{}m"), fg.GetR(), fg.GetG(), fg.GetB());
break;
default:
break;
}
previousFg = fg;
}
if (previousBg != bg)
{
switch (bg.GetType())
{
case ColorType::IsDefault:
buffer.append(L"\x1b[49m");
break;
case ColorType::IsIndex16:
{
uint8_t index = WI_IsFlagSet(bg.GetIndex(), 8) ? 100 : 40;
index += bg.GetIndex() & 7;
fmt::format_to(std::back_inserter(buffer), FMT_COMPILE(L"\x1b[{}m"), index);
break;
}
case ColorType::IsIndex256:
fmt::format_to(std::back_inserter(buffer), FMT_COMPILE(L"\x1b[48;5;{}m"), bg.GetIndex());
break;
case ColorType::IsRgb:
fmt::format_to(std::back_inserter(buffer), FMT_COMPILE(L"\x1b[48;2;{};{};{}m"), bg.GetR(), bg.GetG(), bg.GetB());
break;
default:
break;
}
previousBg = bg;
}
if (previousUl != ul)
{
switch (fg.GetType())
{
case ColorType::IsDefault:
buffer.append(L"\x1b[59m");
break;
case ColorType::IsIndex256:
fmt::format_to(std::back_inserter(buffer), FMT_COMPILE(L"\x1b[58:5:{}m"), ul.GetIndex());
break;
case ColorType::IsRgb:
fmt::format_to(std::back_inserter(buffer), FMT_COMPILE(L"\x1b[58:2::{}:{}:{}m"), ul.GetR(), ul.GetG(), ul.GetB());
break;
default:
break;
}
previousUl = ul;
}
if (previousHyperlinkId != hyperlinkId)
{
if (hyperlinkId)
{
const auto uri = GetHyperlinkUriFromId(hyperlinkId);
if (!uri.empty())
{
buffer.append(L"\x1b]8;;");
buffer.append(uri);
buffer.append(L"\x1b\\");
previousHyperlinkId = hyperlinkId;
}
}
else
{
buffer.append(L"\x1b]8;;\x1b\\");
previousHyperlinkId = 0;
}
}
// Initially, the buffer is initialized with the default attributes, but once it begins to scroll,
// newly scrolled in rows are initialized with the current attributes. This means we need to set
// the current attributes to those of the upcoming row before the row comes up. Or inversely:
// We let the row come up, let it set its attributes and only then print the newline.
if (delayedLineBreak)
{
buffer.append(L"\r\n");
delayedLineBreak = false;
}
auto newX = oldX + it->length;
// Since our text buffer doesn't store the original input text, the information over the amount of trailing
// whitespaces was lost. If we don't do anything here then a row that just says "Hello" would be serialized
// to "Hello ...". If the user restores the buffer dump with a different window size,
// this would result in some fairly ugly reflow. This code attempts to at least trim trailing whitespaces.
//
// As mentioned above for `delayedLineBreak`, rows are initialized with their first attribute, BUT
// only if the viewport has begun to scroll. Otherwise, they're initialized with the default attributes.
// In other words, we can only skip \x1b[K = Erase in Line, if both the first/last attribute are the default attribute.
static constexpr TextAttribute defaultAttr;
const auto trimTrailingWhitespaces = it == last && lastCharX < newX;
const auto clearToEndOfLine = trimTrailingWhitespaces && (beg->value != defaultAttr || last->value != defaultAttr);
if (trimTrailingWhitespaces)
{
newX = lastCharX;
}
buffer.append(row.GetText(oldX, newX));
if (clearToEndOfLine)
{
buffer.append(L"\x1b[K");
}
oldX = newX;
}
const auto moreRowsRemaining = currentRow < lastRowWithText;
delayedLineBreak = !row.WasWrapForced();
if (!moreRowsRemaining)
{
if (previousHyperlinkId)
{
buffer.append(L"\x1b]8;;\x1b\\");
}
buffer.append(L"\x1b[m\r\n");
}
if (buffer.size() >= writeThreshold || !moreRowsRemaining)
if (buffer.size() >= writeThreshold || isLastRow)
{
const auto fileSize = gsl::narrow<DWORD>(buffer.size() * sizeof(wchar_t));
DWORD bytesWritten = 0;
@@ -2629,13 +2421,294 @@ void TextBuffer::Serialize(const wchar_t* destination) const
buffer.clear();
}
if (!moreRowsRemaining)
if (isLastRow)
{
break;
}
}
}
// Serializes one row of the text buffer including ANSI escape code control sequences.
// Arguments:
// - row - A reference to the row being serialized.
// - startX - The first column (inclusive) to include in the serialized content.
// - endX - The last column (exclusive) to include in the serialized content.
// - addLineBreak - Whether to add a line break at the end of the serialized row.
// - isLastRow - Whether this is the final row to be serialized.
// - buffer - A string to write the serialized row into.
// - previousTextAttr - Used for tracking state across multiple calls to `_SerializeRow` for sequential rows.
// The value will be mutated by the call. The initial call should contain `nullopt`, and subsequent calls
// should pass the value that was written by the previous call.
// - delayedLineBreak - Similarly used for tracking state across multiple calls, and similarly will be mutated
// by the call. The initial call should pass `false` and subsequent calls should pass the value that was
// written by the previous call.
void TextBuffer::_SerializeRow(const ROW& row, const til::CoordType startX, const til::CoordType endX, const bool addLineBreak, const bool isLastRow, std::wstring& buffer, std::optional<TextAttribute>& previousTextAttr, bool& delayedLineBreak) const
{
if (const auto lr = row.GetLineRendition(); lr != LineRendition::SingleWidth)
{
static constexpr std::wstring_view mappings[] = {
L"\x1b#6", // LineRendition::DoubleWidth
L"\x1b#3", // LineRendition::DoubleHeightTop
L"\x1b#4", // LineRendition::DoubleHeightBottom
};
const auto idx = std::clamp(static_cast<int>(lr) - 1, 0, 2);
buffer.append(til::at(mappings, idx));
}
const auto startXU16 = gsl::narrow_cast<uint16_t>(startX);
const auto endXU16 = gsl::narrow_cast<uint16_t>(endX);
const auto runs = row.Attributes().slice(startXU16, endXU16).runs();
const auto beg = runs.begin();
const auto end = runs.end();
auto it = beg;
// Don't try to get `end - 1` if it's an empty iterator; in this case we're going to ignore the `last`
// value anyway so just use `end`.
const auto last = it == end ? end : end - 1;
const auto lastCharX = row.MeasureRight();
til::CoordType oldX = startX;
for (; it != end; ++it)
{
const auto effectivePreviousTextAttr = previousTextAttr.value_or(TextAttribute{ CharacterAttributes::Unused1, TextColor{}, TextColor{}, 0, TextColor{} });
const auto previousAttr = effectivePreviousTextAttr.GetCharacterAttributes();
const auto previousHyperlinkId = effectivePreviousTextAttr.GetHyperlinkId();
const auto previousFg = effectivePreviousTextAttr.GetForeground();
const auto previousBg = effectivePreviousTextAttr.GetBackground();
const auto previousUl = effectivePreviousTextAttr.GetUnderlineColor();
const auto attr = it->value.GetCharacterAttributes();
const auto hyperlinkId = it->value.GetHyperlinkId();
const auto fg = it->value.GetForeground();
const auto bg = it->value.GetBackground();
const auto ul = it->value.GetUnderlineColor();
if (previousAttr != attr)
{
auto attrDelta = attr ^ previousAttr;
// There's no escape sequence that only turns off either bold/intense or dim/faint. SGR 22 turns off both.
// This results in two issues in our generic "Mapping" code below. Assuming, both Intense and Faint were on...
// * ...and either turned off, it would emit SGR 22 which turns both attributes off = Wrong.
// * ...and both are now off, it would emit SGR 22 twice.
//
// This extra branch takes care of both issues. If both attributes turned off it'll emit a single \x1b[22m,
// if faint turned off \x1b[22;1m (intense is still on), and \x1b[22;2m if intense turned off (vice versa).
if (WI_AreAllFlagsSet(previousAttr, CharacterAttributes::Intense | CharacterAttributes::Faint) &&
WI_IsAnyFlagSet(attrDelta, CharacterAttributes::Intense | CharacterAttributes::Faint))
{
wchar_t buf[8] = L"\x1b[22m";
size_t len = 5;
if (WI_IsAnyFlagSet(attr, CharacterAttributes::Intense | CharacterAttributes::Faint))
{
buf[4] = L';';
buf[5] = WI_IsAnyFlagSet(attr, CharacterAttributes::Intense) ? L'1' : L'2';
buf[6] = L'm';
len = 7;
}
buffer.append(&buf[0], len);
WI_ClearAllFlags(attrDelta, CharacterAttributes::Intense | CharacterAttributes::Faint);
}
{
struct Mapping
{
CharacterAttributes attr;
uint8_t change[2]; // [0] = off, [1] = on
};
static constexpr Mapping mappings[] = {
{ CharacterAttributes::Intense, { 22, 1 } },
{ CharacterAttributes::Italics, { 23, 3 } },
{ CharacterAttributes::Blinking, { 25, 5 } },
{ CharacterAttributes::Invisible, { 28, 8 } },
{ CharacterAttributes::CrossedOut, { 29, 9 } },
{ CharacterAttributes::Faint, { 22, 2 } },
{ CharacterAttributes::TopGridline, { 55, 53 } },
{ CharacterAttributes::ReverseVideo, { 27, 7 } },
};
for (const auto& mapping : mappings)
{
if (WI_IsAnyFlagSet(attrDelta, mapping.attr))
{
const auto n = til::at(mapping.change, WI_IsAnyFlagSet(attr, mapping.attr));
fmt::format_to(std::back_inserter(buffer), FMT_COMPILE(L"\x1b[{}m"), n);
}
}
}
if (WI_IsAnyFlagSet(attrDelta, CharacterAttributes::UnderlineStyle))
{
static constexpr std::wstring_view mappings[] = {
L"\x1b[24m", // UnderlineStyle::NoUnderline
L"\x1b[4m", // UnderlineStyle::SinglyUnderlined
L"\x1b[21m", // UnderlineStyle::DoublyUnderlined
L"\x1b[4:3m", // UnderlineStyle::CurlyUnderlined
L"\x1b[4:4m", // UnderlineStyle::DottedUnderlined
L"\x1b[4:5m", // UnderlineStyle::DashedUnderlined
};
auto idx = WI_EnumValue(it->value.GetUnderlineStyle());
if (idx >= std::size(mappings))
{
idx = 1; // UnderlineStyle::SinglyUnderlined
}
buffer.append(til::at(mappings, idx));
}
}
if (previousFg != fg)
{
switch (fg.GetType())
{
case ColorType::IsDefault:
buffer.append(L"\x1b[39m");
break;
case ColorType::IsIndex16:
{
uint8_t index = WI_IsFlagSet(fg.GetIndex(), 8) ? 90 : 30;
index += fg.GetIndex() & 7;
fmt::format_to(std::back_inserter(buffer), FMT_COMPILE(L"\x1b[{}m"), index);
break;
}
case ColorType::IsIndex256:
fmt::format_to(std::back_inserter(buffer), FMT_COMPILE(L"\x1b[38;5;{}m"), fg.GetIndex());
break;
case ColorType::IsRgb:
fmt::format_to(std::back_inserter(buffer), FMT_COMPILE(L"\x1b[38;2;{};{};{}m"), fg.GetR(), fg.GetG(), fg.GetB());
break;
default:
break;
}
}
if (previousBg != bg)
{
switch (bg.GetType())
{
case ColorType::IsDefault:
buffer.append(L"\x1b[49m");
break;
case ColorType::IsIndex16:
{
uint8_t index = WI_IsFlagSet(bg.GetIndex(), 8) ? 100 : 40;
index += bg.GetIndex() & 7;
fmt::format_to(std::back_inserter(buffer), FMT_COMPILE(L"\x1b[{}m"), index);
break;
}
case ColorType::IsIndex256:
fmt::format_to(std::back_inserter(buffer), FMT_COMPILE(L"\x1b[48;5;{}m"), bg.GetIndex());
break;
case ColorType::IsRgb:
fmt::format_to(std::back_inserter(buffer), FMT_COMPILE(L"\x1b[48;2;{};{};{}m"), bg.GetR(), bg.GetG(), bg.GetB());
break;
default:
break;
}
}
if (previousUl != ul)
{
switch (fg.GetType())
{
case ColorType::IsDefault:
buffer.append(L"\x1b[59m");
break;
case ColorType::IsIndex256:
fmt::format_to(std::back_inserter(buffer), FMT_COMPILE(L"\x1b[58:5:{}m"), ul.GetIndex());
break;
case ColorType::IsRgb:
fmt::format_to(std::back_inserter(buffer), FMT_COMPILE(L"\x1b[58:2::{}:{}:{}m"), ul.GetR(), ul.GetG(), ul.GetB());
break;
default:
break;
}
}
if (previousHyperlinkId != hyperlinkId)
{
if (hyperlinkId)
{
const auto uri = GetHyperlinkUriFromId(hyperlinkId);
if (!uri.empty())
{
buffer.append(L"\x1b]8;;");
buffer.append(uri);
buffer.append(L"\x1b\\");
}
}
else
{
buffer.append(L"\x1b]8;;\x1b\\");
}
}
previousTextAttr = it->value;
// Initially, the buffer is initialized with the default attributes, but once it begins to scroll,
// newly scrolled in rows are initialized with the current attributes. This means we need to set
// the current attributes to those of the upcoming row before the row comes up. Or inversely:
// We let the row come up, let it set its attributes and only then print the newline.
if (delayedLineBreak)
{
buffer.append(L"\r\n");
delayedLineBreak = false;
}
auto newX = oldX + it->length;
// Since our text buffer doesn't store the original input text, the information over the amount of trailing
// whitespaces was lost. If we don't do anything here then a row that just says "Hello" would be serialized
// to "Hello ...". If the user restores the buffer dump with a different window size,
// this would result in some fairly ugly reflow. This code attempts to at least trim trailing whitespaces.
//
// As mentioned above for `delayedLineBreak`, rows are initialized with their first attribute, BUT
// only if the viewport has begun to scroll. Otherwise, they're initialized with the default attributes.
// In other words, we can only skip \x1b[K = Erase in Line, if both the first/last attribute are the default attribute.
static constexpr TextAttribute defaultAttr;
const auto trimTrailingWhitespaces = it == last && lastCharX < newX;
const auto clearToEndOfLine = trimTrailingWhitespaces && (beg->value != defaultAttr || last->value != defaultAttr);
if (trimTrailingWhitespaces)
{
newX = lastCharX;
}
buffer.append(row.GetText(oldX, newX));
if (clearToEndOfLine)
{
buffer.append(L"\x1b[K");
}
oldX = newX;
}
// Handle empty rows (with no runs). See above for more details about `delayedLineBreak`.
if (delayedLineBreak)
{
buffer.append(L"\r\n");
delayedLineBreak = false;
}
delayedLineBreak = !row.WasWrapForced() && addLineBreak;
if (isLastRow)
{
if (previousTextAttr.has_value() && previousTextAttr->GetHyperlinkId())
{
buffer.append(L"\x1b]8;;\x1b\\");
}
buffer.append(L"\x1b[0m");
if (addLineBreak)
{
buffer.append(L"\r\n");
}
}
}
// Function Description:
// - Reflow the contents from the old buffer into the new buffer. The new buffer
// can have different dimensions than the old buffer. If it does, then this
@@ -3262,23 +3335,30 @@ MarkExtents TextBuffer::_scrollMarkExtentForRow(const til::CoordType rowOffset,
return mark;
}
std::wstring TextBuffer::_commandForRow(const til::CoordType rowOffset, const til::CoordType bottomInclusive) const
std::wstring TextBuffer::_commandForRow(const til::CoordType rowOffset,
const til::CoordType bottomInclusive,
const bool clipAtCursor) const
{
std::wstring commandBuilder;
MarkKind lastMarkKind = MarkKind::Prompt;
const auto cursorPosition = GetCursor().GetPosition();
for (auto y = rowOffset; y <= bottomInclusive; y++)
{
const bool onCursorRow = clipAtCursor && y == cursorPosition.y;
// Now we need to iterate over text attributes. We need to find a
// segment of Prompt attributes, we'll skip those. Then there should be
// Command attributes. Collect up all of those, till we get to the next
// Output attribute.
const auto& row = GetRowByOffset(y);
const auto runs = row.Attributes().runs();
auto x = 0;
for (const auto& [attr, length] : runs)
{
const auto nextX = gsl::narrow_cast<uint16_t>(x + length);
auto nextX = gsl::narrow_cast<uint16_t>(x + length);
if (onCursorRow)
{
nextX = std::min(nextX, gsl::narrow_cast<uint16_t>(cursorPosition.x));
}
const auto markKind{ attr.GetMarkAttributes() };
if (markKind != lastMarkKind)
{
@@ -3298,6 +3378,10 @@ std::wstring TextBuffer::_commandForRow(const til::CoordType rowOffset, const ti
}
// advance to next run of text
x = nextX;
if (onCursorRow && x == cursorPosition.x)
{
return commandBuilder;
}
}
// we went over all the runs in this row, but we're not done yet. Keep iterating on the next row.
}
@@ -3321,7 +3405,7 @@ std::wstring TextBuffer::CurrentCommand() const
// This row did start a prompt! Find the prompt that starts here.
// Presumably, no rows below us will have prompts, so pass in the last
// row with text as the bottom
return _commandForRow(promptY, _estimateOffsetOfLastCommittedRow());
return _commandForRow(promptY, _estimateOffsetOfLastCommittedRow(), true);
}
return L"";
}

View File

@@ -266,6 +266,8 @@ public:
std::wstring GetPlainText(const CopyRequest& req) const;
std::wstring GetWithControlSequences(const CopyRequest& req) const;
std::string GenHTML(const CopyRequest& req,
const int fontHeightPoints,
const std::wstring_view fontFaceName,
@@ -280,7 +282,7 @@ public:
const bool isIntenseBold,
std::function<std::tuple<COLORREF, COLORREF, COLORREF>(const TextAttribute&)> GetAttributeColors) const noexcept;
void Serialize(const wchar_t* destination) const;
void SerializeToPath(const wchar_t* destination) const;
struct PositionInformation
{
@@ -326,12 +328,14 @@ private:
til::point _GetWordEndForSelection(const til::point target, const std::wstring_view wordDelimiters) const;
void _PruneHyperlinks();
std::wstring _commandForRow(const til::CoordType rowOffset, const til::CoordType bottomInclusive) const;
std::wstring _commandForRow(const til::CoordType rowOffset, const til::CoordType bottomInclusive, const bool clipAtCursor = false) const;
MarkExtents _scrollMarkExtentForRow(const til::CoordType rowOffset, const til::CoordType bottomInclusive) const;
bool _createPromptMarkIfNeeded();
std::tuple<til::CoordType, til::CoordType, bool> _RowCopyHelper(const CopyRequest& req, const til::CoordType iRow, const ROW& row) const;
void _SerializeRow(const ROW& row, const til::CoordType startX, const til::CoordType endX, const bool addLineBreak, const bool isLastRow, std::wstring& buffer, std::optional<TextAttribute>& previousTextAttr, bool& delayedLineBreak) const;
static void _AppendRTFText(std::string& contentBuilder, const std::wstring_view& text);
Microsoft::Console::Render::Renderer* _renderer = nullptr;

Binary file not shown.

After

Width:  |  Height:  |  Size: 433 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 804 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 758 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 819 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

View File

@@ -154,7 +154,7 @@
<comment>{Locked=qps-ploc,qps-ploca,qps-plocm}</comment>
</data>
<data name="AppDescription" xml:space="preserve">
<value>Nová Terminál Windows</value>
<value>Nový Terminál Windows</value>
</data>
<data name="AppDescriptionPre" xml:space="preserve">
<value>Terminál Windows s náhledem připravovaných funkcí</value>
@@ -164,11 +164,11 @@
<comment>This is a menu item that will be displayed in the Windows File Explorer that launches the Canary version of Windows Terminal. Please mark one of the characters to be an accelerator key.</comment>
</data>
<data name="ShellExtension_OpenInTerminalMenuItem_Preview" xml:space="preserve">
<value>Otevřít náhled &amp;aplikace Terminal</value>
<value>Otevřít &amp;náhled Terminálu</value>
<comment>This is a menu item that will be displayed in the Windows File Explorer that launches the Preview version of Windows Terminal. Please mark one of the characters to be an accelerator key.</comment>
</data>
<data name="ShellExtension_OpenInTerminalMenuItem" xml:space="preserve">
<value>Otevřít v aplikaci &amp;Terminal</value>
<value>Otevřít v &amp;Terminálu</value>
<comment>This is a menu item that will be displayed in the Windows File Explorer that launches the non-preview version of Windows Terminal. Please mark one of the characters to be an accelerator key.</comment>
</data>
</root>

View File

@@ -1,16 +1,13 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.
#include <string>
#define WIN32_LEAN_AND_MEAN
#include <filesystem>
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include <wil/stl.h>
#include <wil/resource.h>
#include <wil/win32_helpers.h>
#include <gsl/gsl_util>
#include <gsl/pointers>
#include <shellapi.h>
#include <appmodel.h>
@@ -27,10 +24,13 @@
// wants elevated. We'll hang around until ShellExecute is finished, so that the
// process can successfully elevate.
#pragma warning(suppress : 26461) // we can't change the signature of wWinMain
int __stdcall wWinMain(HINSTANCE, HINSTANCE, LPWSTR, int)
// we can't change the signature of wWinMain
#pragma warning(suppress : 26461) // The pointer argument 'cmdline' for function 'wWinMain' can be marked as a pointer to const (con.3).
int __stdcall wWinMain(HINSTANCE, HINSTANCE, LPWSTR cmdline, int)
{
// This will invoke an elevated terminal in two possible ways. See GH#14501
// This will invoke an elevated terminal in two possible ways. We need to do this,
// because ShellExecuteExW() fails to work if we're running elevated and
// the given executable path is a packaged application. See GH#14501.
// In both scenarios, it passes the entire cmdline as-is to the new process.
//
// #1 discover and invoke the app using the GetCurrentApplicationUserModelId
@@ -42,38 +42,26 @@ int __stdcall wWinMain(HINSTANCE, HINSTANCE, LPWSTR, int)
// cmd: {same path as this binary}\WindowsTerminal.exe
// params: new-tab -p {guid}
// see if we're a store app we can invoke with shell:AppsFolder
std::wstring appUserModelId;
const auto result = wil::AdaptFixedSizeToAllocatedResult<std::wstring, APPLICATION_USER_MODEL_ID_MAX_LENGTH>(
appUserModelId, [&](PWSTR value, size_t valueLength, gsl::not_null<size_t*> valueLengthNeededWithNull) noexcept -> HRESULT {
UINT32 length = gsl::narrow_cast<UINT32>(valueLength);
const LONG rc = GetCurrentApplicationUserModelId(&length, value);
switch (rc)
{
case ERROR_SUCCESS:
*valueLengthNeededWithNull = length;
return S_OK;
std::wstring cmd;
case ERROR_INSUFFICIENT_BUFFER:
*valueLengthNeededWithNull = length;
return S_FALSE; // trigger allocation loop
case APPMODEL_ERROR_NO_APPLICATION:
return E_FAIL; // we are not running as a store app
default:
return E_UNEXPECTED;
}
});
LOG_IF_FAILED(result);
std::wstring cmd = {};
if (result == S_OK && appUserModelId.length() > 0)
// scenario #1
{
// scenario #1
cmd = L"shell:AppsFolder\\" + appUserModelId;
#pragma warning(suppress : 26494) // Variable 'buffer' is uninitialized. Always initialize an object (type.5).
wchar_t buffer[APPLICATION_USER_MODEL_ID_MAX_LENGTH];
// "On input, the size of the applicationUserModelId buffer, in wide characters."
UINT32 length = APPLICATION_USER_MODEL_ID_MAX_LENGTH;
const auto result = GetCurrentApplicationUserModelId(&length, &buffer[0]);
if (result == ERROR_SUCCESS)
{
cmd.append(L"shell:AppsFolder\\");
// "On success, the size of the buffer used, including the null terminator."
// --> Remove the null terminator
cmd.append(&buffer[0], length - 1);
}
}
else
if (cmd.empty())
{
// scenario #2
// Get the path to WindowsTerminal.exe, which should live next to us.
@@ -87,20 +75,14 @@ int __stdcall wWinMain(HINSTANCE, HINSTANCE, LPWSTR, int)
// Go!
// The cmdline argument passed to WinMain is stripping the first argument.
// Using GetCommandLine() instead for lParameters
// disable warnings from SHELLEXECUTEINFOW struct. We can't fix that.
#pragma warning(push)
#pragma warning(disable : 26476) // Macro uses naked union over variant.
SHELLEXECUTEINFOW seInfo{ 0 };
#pragma warning(pop)
#pragma warning(suppress : 26476) // Expression/symbol '{seInfo.<unnamed-tag>.hIcon = 0}' uses a naked union 'union ' with multiple type pointers: Use variant instead (type.7).
SHELLEXECUTEINFOW seInfo{};
seInfo.cbSize = sizeof(seInfo);
seInfo.fMask = SEE_MASK_DEFAULT;
seInfo.lpVerb = L"runas"; // This asks the shell to elevate the process
seInfo.lpFile = cmd.c_str(); // This is `shell:AppsFolder\...` or `...\WindowsTerminal.exe`
seInfo.lpParameters = GetCommandLine(); // This is `new-tab -p {guid}`
seInfo.lpParameters = cmdline; // This is `new-tab -p {guid}`
seInfo.nShow = SW_SHOWNORMAL;
LOG_IF_WIN32_BOOL_FALSE(ShellExecuteExW(&seInfo));

View File

@@ -96,7 +96,6 @@ namespace winrt::Microsoft::Terminal::Remoting::implementation
peasant.ShowNotificationIconRequested([this](auto&&, auto&&) { ShowNotificationIconRequested.raise(*this, nullptr); });
peasant.HideNotificationIconRequested([this](auto&&, auto&&) { HideNotificationIconRequested.raise(*this, nullptr); });
peasant.QuitAllRequested({ this, &Monarch::_handleQuitAll });
{
std::unique_lock lock{ _peasantsMutex };
@@ -134,7 +133,7 @@ namespace winrt::Microsoft::Terminal::Remoting::implementation
// - <none> used
// Return Value:
// - <none>
void Monarch::_handleQuitAll(const winrt::Windows::Foundation::IInspectable& /*sender*/, const winrt::Windows::Foundation::IInspectable& /*args*/)
void Monarch::QuitAll()
{
if (_quitting.exchange(true, std::memory_order_relaxed))
{
@@ -166,12 +165,6 @@ namespace winrt::Microsoft::Terminal::Remoting::implementation
{
peasantSearch->second.Quit();
}
else
{
// Somehow we don't have our own peasant, this should never happen.
// We are trying to quit anyways so just fail here.
assert(peasantSearch != _peasants.end());
}
}
}

View File

@@ -86,6 +86,7 @@ namespace winrt::Microsoft::Terminal::Remoting::implementation
uint64_t AddPeasant(winrt::Microsoft::Terminal::Remoting::IPeasant peasant);
void SignalClose(const uint64_t peasantId);
void QuitAll();
uint64_t GetNumberOfPeasants();

View File

@@ -63,6 +63,7 @@ namespace Microsoft.Terminal.Remoting
void HandleActivatePeasant(WindowActivatedArgs args);
void SummonWindow(SummonWindowSelectionArgs args);
void SignalClose(UInt64 peasantId);
void QuitAll();
void SummonAllWindows();
Boolean DoesQuakeWindowExist();

View File

@@ -260,22 +260,6 @@ namespace winrt::Microsoft::Terminal::Remoting::implementation
TraceLoggingKeyword(TIL_KEYWORD_TRACE));
}
void Peasant::RequestQuitAll()
{
try
{
QuitAllRequested.raise(*this, nullptr);
}
catch (...)
{
LOG_CAUGHT_EXCEPTION();
}
TraceLoggingWrite(g_hRemotingProvider,
"Peasant_RequestQuit",
TraceLoggingLevel(WINEVENT_LEVEL_VERBOSE),
TraceLoggingKeyword(TIL_KEYWORD_TRACE));
}
void Peasant::AttachContentToWindow(Remoting::AttachRequest request)
{
try

View File

@@ -56,7 +56,6 @@ namespace winrt::Microsoft::Terminal::Remoting::implementation
void RequestRename(const winrt::Microsoft::Terminal::Remoting::RenameRequestArgs& args);
void RequestShowNotificationIcon();
void RequestHideNotificationIcon();
void RequestQuitAll();
void Quit();
void AttachContentToWindow(Remoting::AttachRequest request);
@@ -76,7 +75,6 @@ namespace winrt::Microsoft::Terminal::Remoting::implementation
til::typed_event<> ShowNotificationIconRequested;
til::typed_event<> HideNotificationIconRequested;
til::typed_event<> QuitAllRequested;
til::typed_event<> QuitRequested;
til::typed_event<winrt::Windows::Foundation::IInspectable, winrt::Microsoft::Terminal::Remoting::AttachRequest> AttachRequested;

View File

@@ -80,7 +80,6 @@ namespace Microsoft.Terminal.Remoting
void RequestShowNotificationIcon();
void RequestHideNotificationIcon();
void RequestQuitAll();
void Quit();
void AttachContentToWindow(AttachRequest request);
@@ -95,7 +94,6 @@ namespace Microsoft.Terminal.Remoting
event Windows.Foundation.TypedEventHandler<Object, Object> ShowNotificationIconRequested;
event Windows.Foundation.TypedEventHandler<Object, Object> HideNotificationIconRequested;
event Windows.Foundation.TypedEventHandler<Object, Object> QuitAllRequested;
event Windows.Foundation.TypedEventHandler<Object, Object> QuitRequested;
event Windows.Foundation.TypedEventHandler<Object, AttachRequest> AttachRequested;

View File

@@ -375,6 +375,18 @@ namespace winrt::Microsoft::Terminal::Remoting::implementation
WindowClosed.raise(s, e);
}
void WindowManager::QuitAll()
{
if (_monarch)
{
try
{
_monarch.QuitAll();
}
CATCH_LOG()
}
}
void WindowManager::SignalClose(const Remoting::Peasant& peasant)
{
if (_monarch)
@@ -430,16 +442,16 @@ namespace winrt::Microsoft::Terminal::Remoting::implementation
winrt::get_self<implementation::Peasant>(peasant)->ActiveTabTitle(title);
}
winrt::fire_and_forget WindowManager::RequestMoveContent(winrt::hstring window,
winrt::hstring content,
uint32_t tabIndex,
Windows::Foundation::IReference<Windows::Foundation::Rect> windowBounds)
safe_void_coroutine WindowManager::RequestMoveContent(winrt::hstring window,
winrt::hstring content,
uint32_t tabIndex,
Windows::Foundation::IReference<Windows::Foundation::Rect> windowBounds)
{
co_await winrt::resume_background();
_monarch.RequestMoveContent(window, content, tabIndex, windowBounds);
}
winrt::fire_and_forget WindowManager::RequestSendContent(Remoting::RequestReceiveContentArgs args)
safe_void_coroutine WindowManager::RequestSendContent(Remoting::RequestReceiveContentArgs args)
{
co_await winrt::resume_background();
_monarch.RequestSendContent(args);

View File

@@ -32,6 +32,7 @@ namespace winrt::Microsoft::Terminal::Remoting::implementation
Remoting::Peasant CreatePeasant(const Remoting::WindowRequestedArgs& args);
void SignalClose(const Remoting::Peasant& peasant);
void QuitAll();
void SummonWindow(const Remoting::SummonWindowSelectionArgs& args);
void SummonAllWindows();
Windows::Foundation::Collections::IVectorView<winrt::Microsoft::Terminal::Remoting::PeasantInfo> GetPeasantInfos();
@@ -42,8 +43,8 @@ namespace winrt::Microsoft::Terminal::Remoting::implementation
bool DoesQuakeWindowExist();
winrt::fire_and_forget RequestMoveContent(winrt::hstring window, winrt::hstring content, uint32_t tabIndex, Windows::Foundation::IReference<Windows::Foundation::Rect> windowBounds);
winrt::fire_and_forget RequestSendContent(Remoting::RequestReceiveContentArgs args);
safe_void_coroutine RequestMoveContent(winrt::hstring window, winrt::hstring content, uint32_t tabIndex, Windows::Foundation::IReference<Windows::Foundation::Rect> windowBounds);
safe_void_coroutine RequestSendContent(Remoting::RequestReceiveContentArgs args);
til::typed_event<winrt::Windows::Foundation::IInspectable, winrt::Microsoft::Terminal::Remoting::FindTargetWindowArgs> FindTargetWindowRequested;

View File

@@ -12,6 +12,7 @@ namespace Microsoft.Terminal.Remoting
Peasant CreatePeasant(WindowRequestedArgs args);
void SignalClose(Peasant p);
void QuitAll();
void UpdateActiveTabTitle(String title, Peasant p);

View File

@@ -49,17 +49,17 @@ try
siEx.StartupInfo.wShowWindow = SW_SHOWNORMAL;
std::filesystem::path modulePath{ wil::GetModuleFileNameW<std::wstring>(wil::GetModuleInstanceHandle()) };
modulePath.replace_filename(runElevated ? ElevateShimExe : WindowsTerminalExe);
std::wstring cmdline;
if (runElevated)
{
RETURN_IF_FAILED(wil::str_printf_nothrow(cmdline, LR"-(-d %s)-", QuoteAndEscapeCommandlineArg(pszName.get()).c_str()));
}
else
{
RETURN_IF_FAILED(wil::str_printf_nothrow(cmdline, LR"-("%s" -d %s)-", GetWtExePath().c_str(), QuoteAndEscapeCommandlineArg(pszName.get()).c_str()));
}
cmdline.reserve(256); // The WindowsTerminal.exe path is ~110 characters long
cmdline.push_back(L'"');
cmdline.append(modulePath.native());
cmdline.append(LR"(" -d )");
QuoteAndEscapeCommandlineArg(pszName.get(), cmdline);
RETURN_IF_WIN32_BOOL_FALSE(CreateProcessW(
runElevated ? modulePath.replace_filename(ElevateShimExe).c_str() : nullptr, // if elevation requested pass the elevate-shim.exe as the application name
modulePath.c_str(),
cmdline.data(),
nullptr, // lpProcessAttributes
nullptr, // lpThreadAttributes
@@ -132,12 +132,11 @@ HRESULT OpenTerminalHere::GetIcon(IShellItemArray* /*psiItemArray*/,
try
{
std::filesystem::path modulePath{ wil::GetModuleFileNameW<std::wstring>(wil::GetModuleInstanceHandle()) };
modulePath.replace_filename(WindowsTerminalExe);
// WindowsTerminal.exe,-101 will be the first icon group in WT
// We're using WindowsTerminal here explicitly, and not wt (from GetWtExePath), because
// WindowsTerminal is the only one built with the right icons.
const auto resource{ modulePath.wstring() + L",-101" };
return SHStrDupW(resource.c_str(), ppszIcon);
modulePath.replace_filename(L"WindowsTerminal.exe,-101");
return SHStrDupW(modulePath.c_str(), ppszIcon);
}
CATCH_RETURN();

View File

@@ -21,13 +21,11 @@
#undef GetCurrentTime
#endif
#include <unknwn.h>
#include <wil/cppwinrt.h>
#include <winrt/Windows.Foundation.h>
#include <winrt/Windows.ApplicationModel.h>
#include <winrt/base.h>
#include <Shobjidl.h>
#include <shlwapi.h>
#include <Unknwn.h>
#include <ShObjIdl.h>
#include <Shlwapi.h>
#include <wrl.h>
#include <wrl/module.h>

View File

@@ -58,7 +58,7 @@ namespace winrt::TerminalApp::implementation
ShellExecute(nullptr, nullptr, currentPath.c_str(), nullptr, nullptr, SW_SHOW);
}
winrt::fire_and_forget AboutDialog::_queueUpdateCheck()
safe_void_coroutine AboutDialog::_queueUpdateCheck()
{
auto strongThis = get_strong();
auto now{ std::chrono::system_clock::now() };

View File

@@ -26,7 +26,7 @@ namespace winrt::TerminalApp::implementation
void _ThirdPartyNoticesOnClick(const IInspectable& sender, const Windows::UI::Xaml::RoutedEventArgs& eventArgs);
void _SendFeedbackOnClick(const IInspectable& sender, const Windows::UI::Xaml::Controls::ContentDialogButtonClickEventArgs& eventArgs);
winrt::fire_and_forget _queueUpdateCheck();
safe_void_coroutine _queueUpdateCheck();
};
}

View File

@@ -548,7 +548,7 @@ namespace winrt::TerminalApp::implementation
{
if (const auto& realArgs = args.ActionArgs().try_as<CopyTextArgs>())
{
const auto handled = _CopyText(realArgs.DismissSelection(), realArgs.SingleLine(), realArgs.CopyFormatting());
const auto handled = _CopyText(realArgs.DismissSelection(), realArgs.SingleLine(), realArgs.WithControlSequences(), realArgs.CopyFormatting());
args.Handled(handled);
}
}
@@ -883,7 +883,7 @@ namespace winrt::TerminalApp::implementation
// - <none>
// Important: Don't take the param by reference, since we'll be doing work
// on another thread.
fire_and_forget TerminalPage::_OpenNewWindow(const INewContentArgs newContentArgs)
safe_void_coroutine TerminalPage::_OpenNewWindow(const INewContentArgs newContentArgs)
{
auto terminalArgs{ newContentArgs.try_as<NewTerminalArgs>() };
@@ -910,10 +910,8 @@ namespace winrt::TerminalApp::implementation
// Build the commandline to pass to wt for this set of NewTerminalArgs
// `-w -1` will ensure a new window is created.
winrt::hstring cmdline{
fmt::format(L"-w -1 new-tab {}",
terminalArgs.ToCommandline().c_str())
};
const auto commandline = terminalArgs.ToCommandline();
winrt::hstring cmdline{ fmt::format(FMT_COMPILE(L"-w -1 new-tab {}"), commandline) };
// Build the args to ShellExecuteEx. We need to use ShellExecuteEx so we
// can pass the SEE_MASK_NOASYNC flag. That flag allows us to safely
@@ -1107,14 +1105,14 @@ namespace winrt::TerminalApp::implementation
{
if (const auto& realArgs = args.ActionArgs().try_as<SearchForTextArgs>())
{
queryUrl = realArgs.QueryUrl().c_str();
queryUrl = std::wstring_view{ realArgs.QueryUrl() };
}
}
// use global default if query URL is unspecified
if (queryUrl.empty())
{
queryUrl = _settings.GlobalSettings().SearchWebDefaultQueryUrl().c_str();
queryUrl = std::wstring_view{ _settings.GlobalSettings().SearchWebDefaultQueryUrl() };
}
constexpr std::wstring_view queryToken{ L"%s" };
@@ -1443,7 +1441,7 @@ namespace winrt::TerminalApp::implementation
}
}
winrt::fire_and_forget TerminalPage::_doHandleSuggestions(SuggestionsArgs realArgs)
safe_void_coroutine TerminalPage::_doHandleSuggestions(SuggestionsArgs realArgs)
{
const auto source = realArgs.Source();
std::vector<Command> commandsCollection;

View File

@@ -1020,10 +1020,21 @@ void AppCommandlineArgs::ValidateStartupCommands()
// handoff connection from the operating system.
if (!_isHandoffListener)
{
// If we only have a single x-save command, then set our target to the
// current terminal window. This will prevent us from spawning a new
// window just to save the commandline.
if (_startupActions.size() == 1 &&
_startupActions.front().Action() == ShortcutAction::SaveSnippet &&
_windowTarget.empty())
{
_windowTarget = "0";
}
// If we parsed no commands, or the first command we've parsed is not a new
// tab action, prepend a new-tab command to the front of the list.
if (_startupActions.empty() ||
_startupActions.front().Action() != ShortcutAction::NewTab)
// (also, we don't need to do this if the only action is a x-save)
else if (_startupActions.empty() ||
(_startupActions.front().Action() != ShortcutAction::NewTab &&
_startupActions.front().Action() != ShortcutAction::SaveSnippet))
{
// Build the NewTab action from the values we've parsed on the commandline.
NewTerminalArgs newTerminalArgs{};

View File

@@ -325,7 +325,7 @@ namespace winrt::TerminalApp::implementation
//
// So DON'T ~give a mouse a cookie~ take a static ref here.
const winrt::hstring modifiedBasename{ std::filesystem::path{ fileModified }.filename().c_str() };
const auto modifiedBasename = std::filesystem::path{ fileModified }.filename();
if (modifiedBasename == settingsBasename)
{
@@ -355,7 +355,7 @@ namespace winrt::TerminalApp::implementation
}
CATCH_LOG()
fire_and_forget AppLogic::_ApplyStartupTaskStateChange()
safe_void_coroutine AppLogic::_ApplyStartupTaskStateChange()
try
{
// First, make sure we're running in a packaged context. This method
@@ -432,6 +432,10 @@ namespace winrt::TerminalApp::implementation
return;
}
}
else
{
_settings.LogSettingChanges(true);
}
if (initialLoad)
{
@@ -550,6 +554,10 @@ namespace winrt::TerminalApp::implementation
return winrt::make<FindTargetWindowResult>(WindowingBehaviorUseNone);
}
// Validate the args now. This will make sure that in the case of a
// single x-save command, we toss that commandline to the current
// terminal window
appArgs.ValidateStartupCommands();
const std::string parsedTarget{ appArgs.GetTargetWindow() };
// If the user did not provide any value on the commandline,

View File

@@ -103,12 +103,12 @@ namespace winrt::TerminalApp::implementation
const Microsoft::Terminal::Settings::Model::WindowingMode& windowingBehavior);
void _ApplyLanguageSettingChange() noexcept;
fire_and_forget _ApplyStartupTaskStateChange();
safe_void_coroutine _ApplyStartupTaskStateChange();
[[nodiscard]] HRESULT _TryLoadSettings() noexcept;
void _ProcessLazySettingsChanges();
void _RegisterSettingsChange();
fire_and_forget _DispatchReloadSettings();
safe_void_coroutine _DispatchReloadSettings();
void _setupFolderPathEnvVar();

View File

@@ -626,7 +626,7 @@ namespace winrt::TerminalApp::implementation
automationPeer.RaiseNotificationEvent(
Automation::Peers::AutomationNotificationKind::ActionCompleted,
Automation::Peers::AutomationNotificationProcessing::CurrentThenMostRecent,
fmt::format(std::wstring_view{ RS_(L"CommandPalette_NestedCommandAnnouncement") }, ParentCommandName()),
RS_fmt(L"CommandPalette_NestedCommandAnnouncement", ParentCommandName()),
L"CommandPaletteNestingLevelChanged" /* unique name for this notification category */);
}
}
@@ -879,7 +879,7 @@ namespace winrt::TerminalApp::implementation
Automation::Peers::AutomationNotificationKind::ActionCompleted,
Automation::Peers::AutomationNotificationProcessing::ImportantMostRecent,
currentNeedleHasResults ?
winrt::hstring{ fmt::format(std::wstring_view{ RS_(L"CommandPalette_MatchesAvailable") }, _filteredActions.Size()) } :
winrt::hstring{ RS_fmt(L"CommandPalette_MatchesAvailable", _filteredActions.Size()) } :
NoMatchesText(), // what to announce if results were found
L"CommandPaletteResultAnnouncement" /* unique name for this group of notifications */);
}
@@ -1204,8 +1204,6 @@ namespace winrt::TerminalApp::implementation
{
Visibility(Visibility::Collapsed);
PreviewAction.raise(*this, nullptr);
// Reset visibility in case anchor mode tab switcher just finished.
_searchBox().Visibility(Visibility::Visible);
@@ -1216,6 +1214,7 @@ namespace winrt::TerminalApp::implementation
ParentCommandName(L"");
_currentNestedCommands.Clear();
PreviewAction.raise(*this, nullptr);
}
void CommandPalette::EnableTabSwitcherMode(const uint32_t startIdx, TabSwitcherMode tabSwitcherMode)

Some files were not shown because too many files have changed in this diff Show More