Compare commits

..

27 Commits

Author SHA1 Message Date
Ethan Balakumar
0252c78997 Terminal receives focus on drag n drop (#20003)
### Summary
Updates terminal to gain foreground focus when a user drags and drops a
file into the terminal.

### Changes
Updates the `DragDropHandler` to call `SetForegroundWindow`.

### Validation
* Built and deployed locally
* Manually verified terminal gains focus when dragging and dropping

Closes #19934

(cherry picked from commit a1a43a4ff5)
Service-Card-Id: PVTI_lADOAF3p4s4BQX0-zgpBND8
Service-Version: 1.25
2026-04-02 19:21:54 -05:00
Theodore Tsirpanis
82d5e0cad3 Use vs-pwsh icons if applicable. (#19990)
## Summary of the Pull Request
This PR updates `VsDevShellGenerator` to use the `vs-pwsh` icon in
generated profiles, if modern PowerShell has been detected.

## References and Relevant Issues
The icons were added in #17706, but are not used anywhere.

## Detailed Description of the Pull Request / Additional comments
* Updated `VsDevShellGenerator::GetProfileCommandLine` to accept a
`bool& isPwsh` parameter, which is set to whether the generated profile
command line is using modern PowerShell. This value gets passed to
`VsDevShellGenerator::GetProfileIconPath`'s new parameter, which
determines whether to return the icon for `powershell` or `pwsh`.

(cherry picked from commit e0400150d0)
Service-Card-Id: PVTI_lADOAF3p4s4BQX0-zgpBNIk
Service-Version: 1.25
2026-04-02 19:21:52 -05:00
Leonard Hecker
d960f4a05a Make disabling the Kitty Keyboard Protocol possible (#19995)
Avoid translating W32IM sequences to KKP.

Closes #19977

## Validation Steps Performed
* Use French Bepo keyboard layout
* Disable KKP
* Use fish shell
* `AltGr+Y` produces `{` 

(cherry picked from commit 0f5d883c59)
Service-Card-Id: PVTI_lADOAF3p4s4BQX0-zgpBMwc
Service-Version: 1.25
2026-04-02 19:21:51 -05:00
Dustin L. Howett
2c9277cbb4 Only honor Ctrl+Z during ReadFile if the console is in PROCESSED mode (#19940)
This restores the behavior of ReadFile to that of Windows 7.

Closes #4958

(cherry picked from commit 80e4b3c947)
Service-Card-Id: PVTI_lADOAF3p4s4BQX0-zgpBM28
Service-Version: 1.25
2026-04-02 19:21:49 -05:00
Carlos Zamora
e382d328b2 Improve UX for selection during VTMM (#19973)
Selection in VT mouse mode has been feeling a little weird. I've made a
few changes in this space to improve the overall experience when in vt
mouse mode:
- don't round selection positions: this means that you now highlight the
cell you're on if you're going right, and the adjacent cell if you're
going left
- fix drag-left excluding the current cell
- #9608: shift+click now clears any existing selection instead of
extending it. This feels more intuitive since Shift already works as the
override modifier

Somewhat related to #18106

## Validation
 alt selections feel consistent
 selecting in VTMM feels accurate (selects the cell we started on)
 creating new selections (aka clearing old selection) in VTMM feels
intuitive (forwards and backwards)

Closes #9608

(cherry picked from commit 2e33056fd8)
Service-Card-Id: PVTI_lADOAF3p4s4BQX0-zgna3V8
Service-Version: 1.25
2026-04-02 19:14:34 -05:00
Carlos Zamora
2bd369939c Update 'restart connection' action to reset internal state (#19971)
## Summary of the Pull Request
I was becoming frustrated with getting in a state where a CLI app (i.e.
Copilot CLI) enters some VT state (like mouse mode) then doesn't unset
it when it accidentally exits. I normally use "Restart connection" to
keep the buffer and connect again. Problem is, "restart connection"
didn't actually reset the internal state! So I would type and get a
bunch of lingering VT escape sequences. This bug is tracked over in
#18425 in a more generic way.

This fixes that bug by doing the following:
- update `ITermDispatch::HardReset()` -->`HardReset(bool erase)`
   - `erase=true` does what `HardReset()` already did
- `erase=false` skips over clearing the screen and resetting the cursor
position
- expose `HardReset(false)` as `HardResetWithoutErase()` by piping it up
through `Terminal` --> `ControlCore` --> `TermControl`
-  update the restart connection handler
- `TerminalPage::_restartPaneConnection()` now calls
`HardResetWithoutErase()` before setting the new connection
- this is also the same route for the "Enter to restart connection"
scenario (text displayed when connection ends)

Relevant notes from PR discussion:
- `PSEUDOCONSOLE_INHERIT_CURSOR` is passed into the new connection via
`_restartPaneConnection()` --> `_duplicateConnectionForRestart()` -->
`_CreateConnectionFromSettings(profile,
*controlSettings.DefaultSettings(), true)`

## Validation Steps Performed
- Used this to enter mouse tracking mode: `Write-Host -NoNewline
"`e[?1003h`e[?1006h"`
- mouse selection doesn't work as usual (expected)
- invoke "restart connection" action
- mouse selection works as usual

Closes #18425

(cherry picked from commit ec939aabda)
Service-Card-Id: PVTI_lADOAF3p4s4BQX0-zgpBL5s
Service-Version: 1.25
2026-04-02 19:14:13 -05:00
Leonard Hecker
7f5185eb06 Implement OSC 7 for setting the CWD (#20019)
This adds support for OSC 7 which is the same as OSC 9;9 but using
file URIs. As per the previous discussion in #8214, the problem is
that WSL shells emit URIs that can't work because the hostname in
the URI translates to an UNC path with an non-existing hostname.
In my opinion this doesn't deter the fact though that OSC 7 works
just fine for a native Windows application.

In the future we should consider trying to detect WSL file URIs
and translating it to the `--cd` argument for `wsl.exe`.

All of the heavy lifting for parsing the URI is done by
`PathCreateFromUrlW`. It just had to be plugged into the OSC 9;9 code.

Closes #3158

## Validation Steps Performed
* Launch fish-shell in WSL
* Duplicate tab works 
* (And because it doesn't work without using
  `IsValidDirectory` I know that OSC 7 works )

(cherry picked from commit 4ce79d7289)
Service-Card-Id: PVTI_lADOAF3p4s4BQX0-zgpBLe8
Service-Version: 1.25
2026-04-02 19:14:12 -05:00
Leonard Hecker
0291d97503 Send a CPR request on every unknown sequence (#20009)
This PR is 90% wiring up OOP interfaces.

Closes #19926

## Validation Steps Performed
* Run `github.com/xtermjs/vtc`
* Observed `UnknownSequence` calls under a debugger

(cherry picked from commit da0446a7d1)
Service-Card-Id: PVTI_lADOAF3p4s4BQX0-zgpBLzY
Service-Version: 1.25
2026-04-02 19:14:10 -05:00
Carlos Zamora
f7a5515cf7 Fix selection markers appearing on scroll (#20045)
## Summary of the Pull Request
Updates the scroll handler to check the selection mode before updating
the markers.

Introduced in #19974

## Validation Steps Performed
`ls` --> create selection --> scroll away and back
 keyboard selection: markers are present both times
 mouse selection: markers are missing both times

(cherry picked from commit 3104c8feb2)
Service-Card-Id: PVTI_lADOAF3p4s4BQX0-zgo0IB8
Service-Version: 1.25
2026-03-31 18:19:19 -05:00
Carlos Zamora
2219739391 Fix search dropdown theming (#19987)
## Summary of the Pull Request
Popups are in their own separate tree, so we had to find it and set the
theme ourselves.

## Validation Steps Performed
Prereq: Windows theme = light + terminal theme = dark
 settings search dropdown is dark theme

Closes #19927

(cherry picked from commit c562dad15d)
Service-Card-Id: PVTI_lADOAF3p4s4BQX0-zgnsPtk
Service-Version: 1.25
2026-03-31 18:19:17 -05:00
jason
7cff119b34 Fix Korean IME arrow key inserting character at wrong position (#20039)
Fix a regression introduced in v1.24 where pressing an arrow key during
Korean IME composition caused the committed character to be inserted at
the wrong cursor position.

Before #19738, the Korean IME activated through IMM32 (excluded from TSF
by `TF_TMAE_UIELEMENTENABLEDONLY`) and was not affected by
`TermControl::_KeyHandler` forwarding keys to the PTY during
composition. After #19738, the Korean IME activates through TSF, making
a missing composition guard in `_KeyHandler` visible as a bug.

The sequence of events that causes the bug:

1. User presses Left arrow during active Korean IME composition (e.g.
composing `가`).
2. `_KeyHandler` calls `_TrySendKeyEvent(VK_LEFT)` which enqueues
`\x1b[D` to the PTY input queue. The cursor moves.
3. TSF processes the key. The Korean IME sees the arrow and ends the
composition.
4. `OnEndComposition` schedules `_doCompositionUpdate` with
`TF_ES_ASYNC`.
5. The async session fires, reads finalized text `가`, calls
`HandleOutput("가")`.
6. PTY processes `[\x1b[D, "가"]`: cursor moves left first, then `가` is
inserted at the wrong (already-moved) position.

The fix adds a guard before `_TrySendKeyEvent`, which mirrors the
existing behavior in conhost (windowio.cpp). When TSF has an active
composition, key events are not converted into input. The Korean IME
re-injects navigation and confirmation keys after the composition ends,
at which point `HasActiveComposition()` returns false and they are
forwarded normally.

**Historical note:** This guard was not needed before PR #17067 (v1.22)
because the old implementation used WinRT `CoreTextServices` via XAML
(`TSFInputControl.xaml`). The XAML framework intercepted composition key
events before `_KeyHandler`. The new custom Win32 TSF context in #17067
no longer does this. The bug was latent from v1.22 but only became
visible for Korean in v1.24 when #19738 removed
`TF_TMAE_UIELEMENTENABLEDONLY`.

## Validation Steps Performed

1. Open Windows Terminal with Korean IME (Dubeolsik layout).
2. Type `rk` to begin composing `가` (composition active, syllable not
yet committed).
3. Press the Left arrow key.
4. Before fix: `가` is inserted one cell to the left of the intended
position.
5. After fix: `가` is inserted at the correct position, then cursor moves
left.

Also verified:
- Normal Korean text input (typing without arrow keys) still works
correctly.
- Arrow key navigation when no composition is active still works
correctly.
- English and other IME input is not affected.

Closes #20038
Refs #19738

(cherry picked from commit 14f4271954)
Service-Card-Id: PVTI_lADOAF3p4s4BQX0-zgo0JpM
Service-Version: 1.25
2026-03-31 17:44:28 -05:00
Dustin L. Howett
58414c542f conpty: remove accidental bool; use BOOL instead (#20035)
Closes #19102

(cherry picked from commit 01f8a4031d)
Service-Card-Id: PVTI_lADOAF3p4s4BQX0-zgoyJIE
Service-Version: 1.25
2026-03-31 17:44:26 -05:00
Dustin L. Howett
bf77086b60 Reinstate the (apparently) load-bearing empty bracketed paste (#20037)
Some applications have come to rely on an "empty" bracketed paste packet
to indicate that the clipboard was _requested,_ but not sent. Some
agentic CLI tools use this to guess whether the clipboard contained e.g.
an image or otherwise unserializable data.

Apparently, gnome-terminal and VS Code do this; others as well (I tested
xterm, konsole, gnome-terminal and I can't remember which ones did and
which ones did not.)

Refs #19517

(cherry picked from commit 2870a702f4)
Service-Card-Id: PVTI_lADOAF3p4s4BQX0-zgotgA4
Service-Version: 1.25
2026-03-31 17:44:25 -05:00
gcrtnst
2644ca0a8a Fix MSB4019 error in ConPTY nupkg (#20029)
This commit fixes the following error that occurs when attempting to use the
`Microsoft.Windows.Console.ConPTY` nupkg in a Visual C++ project:

    MSB4019: The imported project "C:\Microsoft.Windows.Console.ConPTY.props" was not found.

Based on the list of reserved and well-known properties, the property
`MSBuildThisProjectDirectory` does not appear to exist.  This PR
replaces it with the correct property, `MSBuildThisFileDirectory`.

(cherry picked from commit be5dcf8e7a)
Service-Card-Id: PVTI_lADOAF3p4s4BQX0-zgotQIk
Service-Version: 1.25
2026-03-30 17:46:06 -05:00
Sagar
1ad9a2e932 Fix copyOnSelect right-click overwriting clipboard with stale selection (#19943)
## Summary of the Pull Request
Fix `copyOnSelect` right-click paste overwriting the clipboard with a
stale selection instead of pasting the current clipboard contents.

## Detailed Description of the Pull Request / Additional comments
When `copyOnSelect` is enabled, the selected text is already copied to
the clipboard on left mouse button release in `PointerReleased`. The
selection is intentionally left visible as a visual reference (the
`_selectionNeedsToBeCopied` flag is set to `false` to track that the
copy already happened).

However, the right-click handler in `PointerPressed` unconditionally
called `CopySelectionToClipboard()` before pasting, ignoring both the
`copyOnSelect` setting and the `_selectionNeedsToBeCopied` flag. This
caused any still-visible selection to be re-copied to the clipboard,
overwriting whatever the user may have copied from another application
(or another terminal tab) in the meantime.

This change splits the right-click behavior based on the `copyOnSelect`
setting:
- **`copyOnSelect: true`** — Skip the redundant copy, clear the
selection, and paste directly. The text was already copied on mouse-up.
- **`copyOnSelect: false`** — Preserve existing behavior: copy the
selection (if any), clear it, and paste only if there was no selection
to copy.

## Validation Steps Performed
1. Set `"copyOnSelect": true` in `settings.json`.
2. Selected text in a terminal pane - verified it was copied to
clipboard on mouse-up.
3. Switched to Notepad, copied different text ("NEW TEXT").
4. Switched back to Terminal (selection still visible), right-clicked —
verified "NEW TEXT" was pasted, not the old selection.
5. Verified right-click with no active selection still pastes clipboard
contents.
6. Verified right-click immediately after selecting (no app switch)
pastes the just-selected text.
7. Set `"copyOnSelect": false` — verified right-click still copies
selection first, then pastes only when no selection exists (original
behavior unchanged).
8. Verified tab-switching with an active selection does not cause stale
clipboard overwrites on right-click.

## PR Checklist
Closes #14465 (dupe of #19942)

---------

Co-authored-by: Sagar Bhure <sagarbhure@microsoft.com>
(cherry picked from commit ad7b34e55f)
Service-Card-Id: PVTI_lADOAF3p4s4BQX0-zgn30Ls
Service-Version: 1.25
2026-03-30 17:46:05 -05:00
Leonard Hecker
74f3bb42e1 Fix a deadlock during cooked reads (#19994)
Closes #19922

## Validation Steps Performed
* The repro now works as expected 
  (`CreatePseudoConsole({1,20})` + `WriteFile("キ")`)

(cherry picked from commit ddf514e99e)
Service-Card-Id: PVTI_lADOAF3p4s4BQX0-zgn2sRU
Service-Version: 1.25
2026-03-30 17:46:03 -05:00
Carlos Zamora
c0ca78c3ee Fix selection markers disappearing after scrolling out of view (#19974)
## Summary of the Pull Request
Pretty straightforward

## Validation Steps Performed
 Selection markers are present after scrolling them out of view and
scrolling back

Closes #17135

(cherry picked from commit 14ee19fc27)
Service-Card-Id: PVTI_lADOAF3p4s4BQX0-zgna-WM
Service-Version: 1.25
2026-03-30 17:46:02 -05:00
Dustin L. Howett
37dc437e65 Suppress the invalid media error in Stable (#19969)
It's creating a lot of noise for folks, and it is not particularly
_helpful_ since it does not specify a location or even name which
resource failed to load or parse.

On stable, let's just silently ignore them.

Refs #19964

(cherry picked from commit 6d7fac999a)
Service-Card-Id: PVTI_lADOAF3p4s4BQX0-zgnTk_s
Service-Version: 1.25
2026-03-12 17:14:58 -05:00
Artem Lytkin
4a782b062c control: focus terminal on click-drag while search is open (#19931)
## Summary
- Fix inability to copy terminal text via Ctrl+C when the search dialog
is open
- Root cause: click-and-drag doesn't call `Focus()` because `_focused`
is already `true` (set by the search box's bubbling GotFocus)
- Fix: also focus the terminal when the search box contains keyboard
focus

## Detailed Description of the Pull Request / Additional comments
When the search dialog is open and the user click-drags in the terminal
to select text, `_PointerPressedHandler` skips
`Focus(FocusState::Pointer)` because `_focused` is `true`. The
`_focused` flag is `true` because the `SearchBoxControl` is a child of
`TermControl` in the XAML visual tree, so `TermControl`'s
`_GotFocusHandler` fires (via bubbling `GotFocus`) when the search box's
`TextBox` gains focus, setting `_focused = true`.

The fix adds a `ContainsFocus()` check so that focus is explicitly moved
to the terminal when the search box has keyboard focus. This makes
click-drag behavior consistent with tap behavior (`_TappedHandler`
already focuses unconditionally) and uses the same `ContainsFocus()`
pattern already established at lines 1569 and 2366 in the same file.

## Validation Steps Performed
- Verified click-drag + Ctrl+C copies selected text when search dialog
is open
- Verified simple click (tap) in terminal while search is open still
works
- Verified clicking in the search box retains focus in the search box
- Verified typing in search box still works when it has focus
- Verified Escape still closes the search box
- Verified Ctrl+C with no selection while search is open doesn't break
- Code formatted with clang-format

## PR Checklist
 Closes #19908

(cherry picked from commit e2d51636cd)
Service-Card-Id: PVTI_lADOAF3p4s4BQX0-zgnOgZ8
Service-Version: 1.25
2026-03-12 17:14:56 -05:00
Carlos Zamora
4701843082 Fix memory leaks with UIA (#19950)
## Summary of the Pull Request
This includes the memory leak fixes that @lhecker and I investigated as
a part of #19710.

The `ITextRangeProvider`s (namely `UiaTextRange`s) weren't being
destroyed after they were done being used by the screen reader.

## Validation Steps Performed
In my own testing, I set a breakpoint on the destructor for
`UiaTextRangeBase`. Prior to this change, that destructor would mainly
be called when the terminal control was closed, which would result in us
leaking these objects. With this change, I've confirmed that these text
ranges are being destroyed immediately after they are done being used
(without needing to close the terminal control).

## PR Checklist
Closes #19710

(cherry picked from commit e2110e716c)
Service-Card-Id: PVTI_lADOAF3p4s4BQX0-zgnOhC8
Service-Version: 1.25
2026-03-12 17:14:55 -05:00
Leonard Hecker
efe9f27c00 Make TSF initialization fully fallible (#19958)
Apparently, on some (internal) variants of Windows `TF_CategoryMgr`
can exist while `TF_DisplayAttributeMgr` is absent. This is likely
a variant configuration error, but we shouldn't crash anyway.

Closes MSFT-61309810

(cherry picked from commit 30b1456ffe)
Service-Card-Id: PVTI_lADOAF3p4s4BQX0-zgnOg_4
Service-Version: 1.25
2026-03-12 17:14:53 -05:00
sagarbhure-dev
008e293205 Fix GenerateSettingsIndex using element name instead of x:Name (#19945)
Use GetAttribute('x:Name') instead of .Name in GenerateSettingsIndex.ps1
to avoid PowerShell's XML integration returning the element tag name
(e.g. 'local:SettingContainer') when x:Name is absent.

Also add missing x:Name attributes to:
- Compatibility.xaml: AmbiguousWidth SettingContainer
- NewTabMenu.xaml: AddRemainingProfiles and CurrentFolderIcon containers

## Summary of the Pull Request
Fix GenerateSettingsIndex.ps1 emitting "local:SettingContainer" as the
element name in the generated index when a SettingContainer has no
x:Name attribute.

## References and Relevant Issues
Per DHowett's comment - the root cause is PowerShell's XML integration:
$element.Name returns the XML element tag name (e.g.
local:SettingContainer) when no x:Name attribute exists.

## Detailed Description of the Pull Request / Additional comments
Two changes:

- GenerateSettingsIndex.ps1: Replace $settingContainer.Name with
$settingContainer.GetAttribute("x:Name"), which correctly returns an
empty string when the attribute is absent instead of the element tag
name.

- Add missing x:Name attributes to three SettingContainer elements:
    - Compatibility.xaml: AmbiguousWidth (Globals_AmbiguousWidth)
- NewTabMenu.xaml: AddRemainingProfiles
(NewTabMenu_AddRemainingProfiles)
    - NewTabMenu.xaml: CurrentFolderIcon (NewTabMenu_CurrentFolderIcon)
- This fixes four incorrect IndexEntry lines in the generated output
that previously contained L"local:SettingContainer" as the element name.

## Validation Steps Performed
Ran GenerateSettingsIndex.ps1 before and after - confirmed the four
incorrect entries with L"local:SettingContainer" are now generated with
the correct x:Name values (or empty string where appropriate).

## PR Checklist
Closes #19929

Co-authored-by: Sagar Bhure <sagarbhure@microsoft.com>
(cherry picked from commit 8cad67020f)
Service-Card-Id: PVTI_lADOAF3p4s4BQX0-zgnOg9Q
Service-Version: 1.25
2026-03-12 17:14:51 -05:00
Dustin L. Howett
7adb2157a5 vpack: actually, we have to use a 3-segment version number (#19939)
Our last build failed because it tried to pass "10621.0" off as a
uint64. I didn't know it had to be a single number... so let's use the
3-component equivalent (which would have been 1.24.260303001)

(cherry picked from commit 5828fb5ce5)
Service-Card-Id: PVTI_lADOAF3p4s4BQX0-zgms2-E
Service-Version: 1.25
2026-03-12 17:14:50 -05:00
Dustin L. Howett
9ae724aa5b build: make sure the AnyCPU build sets BuildPlatform properly (#19925)
This caused the WPF-only build (packaging phase, really) to fail.

Fixes d6714f3ca9 (#19328)

(cherry picked from commit 0f6ee4ad2e)
Service-Card-Id: PVTI_lADOAF3p4s4BQX0-zgmftD0
Service-Version: 1.25
2026-03-02 14:45:41 -06:00
Windows Console Service Bot
d6da2555f5 Localization Updates - main - 03/02/2026 (#19914)
Co-authored-by: Console Service Bot <consvc@microsoft.com>
(cherry picked from commit 59c7e3b73c)
Service-Card-Id: PVTI_lADOAF3p4s4BQX0-zgmfcKA
Service-Version: 1.25
2026-03-02 14:45:40 -06:00
Dustin L. Howett
f740350283 build: reset version year so 1.25 preview starts over from 2026 2026-02-27 17:48:25 -06:00
Dustin L. Howett
62512eb116 pgo: train 1.25 separately 2026-02-27 17:48:09 -06:00
71 changed files with 800 additions and 1035 deletions

View File

@@ -93,7 +93,7 @@ jobs:
steps:
- name: check-spelling
id: spelling
uses: check-spelling/check-spelling@c635c2f3f714eec2fcf27b643a1919b9a811ef2e # v0.0.25
uses: check-spelling/check-spelling@v0.0.25
with:
suppress_push_for_open_pull_request: ${{ github.actor != 'dependabot[bot]' && 1 }}
checkout: true
@@ -153,7 +153,7 @@ jobs:
if: (success() || failure()) && needs.spelling.outputs.followup && github.event_name == 'push'
steps:
- name: comment
uses: check-spelling/check-spelling@c635c2f3f714eec2fcf27b643a1919b9a811ef2e # v0.0.25
uses: check-spelling/check-spelling@v0.0.25
with:
checkout: true
spell_check_this: microsoft/terminal@main
@@ -171,7 +171,7 @@ jobs:
if: (success() || failure()) && needs.spelling.outputs.followup && contains(github.event_name, 'pull_request')
steps:
- name: comment
uses: check-spelling/check-spelling@c635c2f3f714eec2fcf27b643a1919b9a811ef2e # v0.0.25
uses: check-spelling/check-spelling@v0.0.25
with:
checkout: true
spell_check_this: microsoft/terminal@main
@@ -197,7 +197,7 @@ jobs:
cancel-in-progress: false
steps:
- name: apply spelling updates
uses: check-spelling/check-spelling@c635c2f3f714eec2fcf27b643a1919b9a811ef2e # v0.0.25
uses: check-spelling/check-spelling@v0.0.25
with:
experimental_apply_changes_via_bot: ${{ github.repository_owner != 'microsoft' && 1 }}
checkout: true

View File

@@ -15,6 +15,7 @@
- [Via Chocolatey (unofficial)](#via-chocolatey-unofficial)
- [Via Scoop (unofficial)](#via-scoop-unofficial)
- [Installing Windows Terminal Canary](#installing-windows-terminal-canary)
- [Windows Terminal Roadmap](#windows-terminal-roadmap)
- [Terminal \& Console Overview](#terminal--console-overview)
- [Windows Terminal](#windows-terminal)
- [The Windows Console Host](#the-windows-console-host)
@@ -177,6 +178,11 @@ _Learn more about the [types of Windows Terminal distributions](https://learn.mi
---
## Windows Terminal Roadmap
The plan for the Windows Terminal [is described here](/doc/roadmap-2023.md) and
will be updated as the project proceeds.
## Terminal & Console Overview
Please take a few minutes to review the overview below before diving into the

View File

@@ -56,10 +56,9 @@ Dies ist ein Open Source-Projekt, und wir freuen uns über die Teilnahme der Com
<ReleaseNotes>
Version __VERSION_NUMBER__
Endlich die Möglichkeit, nach beliebigen Einstellungen zu suchen!
Ein neuer nativer Editor für Tastenkombinationen, Aktionen und Einträge in der Befehlspalette.
Neue Community-Übersetzungen für Serbisch und Ukrainisch
Unterstützung für das „Kitty“-Tastaturprotokoll für hochauflösende Eingabecodierung
Eine komplett neue Erweiterungsseite, die anzeigt, was in Ihrem Terminal installiert ist
Die Befehlspalette wird jetzt sowohl in Ihrer Muttersprache als auch auf Englisch angezeigt
Neue VT-Features wie synchronisiertes Rendering, neue Farbschemas, Konfiguration für schnelle Mausaktionen wie Zoomen und mehr
Weitere Informationen finden Sie auf unserer GitHub-Releaseseite.
</ReleaseNotes>

View File

@@ -54,12 +54,11 @@ This is an open source project and we welcome community participation. To partic
<!-- _locComment_text="{MaxLength=255} App DevStudio" -->
</DevStudio>
<ReleaseNotes _locID="App_ReleaseNotes">
<!-- _locComment_text="{MaxLength=1500} {Locked=__VERSION_NUMBER__}{Locked=wt.exe}{Locked=Kitty} App Release Note" -->Version __VERSION_NUMBER__
<!-- _locComment_text="{MaxLength=1500} {Locked=__VERSION_NUMBER__}{Locked=wt.exe} App Release Note" -->Version __VERSION_NUMBER__
- Finally, the ability to search for any setting!
- A new native editor for key bindings, actions and command palette entries.
- New community localizations to Serbian and Ukrainian
- Support for the "Kitty" keyboard protocol for high-fidelity input encoding
- A whole new Extensions page that shows what has been installed into your Terminal
- Command Palette now shows up in your native language as well as English
- New VT features such as synchronized rendering, new color schemes, configuration for quick mouse actions like zooming, and more
Please see our GitHub releases page for additional details.
</ReleaseNotes>

View File

@@ -54,12 +54,11 @@ Este es un proyecto de fuente abierta y animamos a la comunidad a participar. Pa
</DevStudio>
<ReleaseNotes>
Version __VERSION_NUMBER__
Versión __VERSION_NUMBER__
- Por último, la capacidad de buscar cualquier configuración.
- Nuevo editor nativo para asignaciones de teclas, acciones y entradas de la paleta de comandos.
- Nuevas localizaciones comunitarias para serbio y ucraniano
- Soporte para el protocolo de teclado "Kitty" para codificación de entrada de alta fidelidad
- Página Extensiones completamente nueva que muestra lo que se ha instalado en tu terminal
- La paleta de comandos ahora se muestra en tu idioma nativo, así como en inglés
- Nuevas características de VT, como la representación sincronizada, nuevos esquemas de color, configuración para acciones rápidas del ratón, como el zoom, y más
Consulta la página de versiones de GitHub para más información.
</ReleaseNotes>

View File

@@ -56,12 +56,11 @@ Il sagit dun projet open source et nous vous invitons à participer dans l
<ReleaseNotes>
Version __VERSION_NUMBER__
- Enfin, la possibilité de rechercher nimporte quel paramètre !
- Un nouvel éditeur natif pour les raccourcis clavier, les actions et les entrées de la palette de commandes.
- De nouvelles localisations communautaires en serbe et en ukrainien
- Une prise en charge du protocole clavier « Kitty » pour un encodage dentrée à haute fidélité
- Une toute nouvelle page Extensions qui montre ce qui a été installé dans votre terminal
- La palette de commandes saffiche désormais dans votre langue native, ainsi quen anglais
- Nouvelles fonctionnalités VT telles que le rendu synchronisé, de nouveaux schémas de couleurs, la configuration pour des actions rapides de la souris comme le zoom, et plus encore
Consultez notre page des versions de GitHub pour plus de détails.
Veuillez consulter notre page des versions GitHub pour découvrir dautres détails.
</ReleaseNotes>
<ScreenshotCaptions>
<!-- Valid length: 200 character limit, up to 9 elements per platform -->

View File

@@ -54,12 +54,11 @@ Si tratta di un progetto open source e la partecipazione della community è molt
</DevStudio>
<ReleaseNotes>
Versione __VERSION_NUMBER__
Versione __VERSION_NUMBER__
- Finalmente è possibile cercare qualsiasi impostazione
- Nuovo editor nativo per le associazioni di tasti, le azioni e le voci del riquadro comandi.
- Nuove localizzazioni della community in serbo e ucraino
- Supporto per il protocollo di tastiera "Kitty" per una codifica dell'input ad alta fedeltà
- Una pagina Estensioni completamente nuova che mostra ciò che è stato installato nel terminale
- Il riquadro comandi ora viene visualizzato nella tua lingua di origine oltre che in inglese
- Nuove funzionalità VT come il rendering sincronizzato, le nuove combinazioni di colori, la configurazione per azioni rapide del mouse come lo zoom e altro ancora
Per altri dettagli, vedi la pagina delle release di GitHub.
</ReleaseNotes>

View File

@@ -56,10 +56,9 @@
<ReleaseNotes>
バージョン __VERSION_NUMBER__
- 最後に、任意の設定を検索する機能です。
- キー バインド、アクション、コマンド パレット エントリ用の新しいネイティブ エディター。
- セルビア語とウクライナ語への新しいコミュニティ ローカライズ
- 高忠実度入力エンコード用の "Kitty" キーボード プロトコルのサポート
- ターミナルに何がインストールされているかを表示する新しい [拡張機能] ページ
- コマンド パレットがネイティブ言語と英語で表示されるようになりました
- 同期レンダリング、新しい配色、ズームなどのクイック マウス操作の構成などの、新しい VT 機能
詳細については、GitHub リリース ページをご覧ください。
</ReleaseNotes>

View File

@@ -56,12 +56,11 @@
<ReleaseNotes>
버전 __VERSION_NUMBER__
- 드디어 모든 설정을 검색할 수 있게 되었어요!
- 키 바인딩, 작업, 명령 팔레트 항목을 위한 새로운 기본 편집기가 추가되었습니다.
- 세르비아어와 우크라이나어 커뮤니티 지역화를 새롭게 지원합니다.
- 고품질 입력 인코딩을 위해 "Kitty" 키보드 프로토콜을 지원합니다.
- 터미널에 설치된 항목을 보여 주는 완전히 새로운 확장 페이지
- 명령 팔레트가 이제 영어뿐만 아니라 모국어로도 표시
- 동기화된 렌더링, 새로운 색 구성표, 확대/축소와 같은 빠른 마우스 동작을 위한 구성 등 새로운 VT 기능이 추가
자세한 정보는 GitHub 릴리스 페이지를 참하세요.
자세한 내용은 GitHub 릴리스 페이지를 참하세요.
</ReleaseNotes>
<ScreenshotCaptions>
<!-- Valid length: 200 character limit, up to 9 elements per platform -->

View File

@@ -56,10 +56,9 @@ Este é um projeto de código aberto e a participação da comunidade é bem-vin
<ReleaseNotes>
Version __VERSION_NUMBER__
- Finalmente, a possibilidade de pesquisar qualquer configuração!
- Um novo editor nativo para combinações de teclas, ações e entradas na paleta de comandos.
- Novas localizações da comunidade para sérvio e ucraniano
- Suporte para o protocolo de teclado "Kitty" para codificação de entrada de alta fidelidade
Uma nova página de Extensões que mostra o que foi instalado no seu Terminal
A Paleta de Comandos agora aparece no seu idioma nativo, além do inglês
Novos recursos da VT, como renderização sincronizada, novos esquemas de cores, configuração para ações rápidas do mouse, como zoom, e muito mais
Confira nossa página de lançamentos no GitHub para obter mais detalhes.
</ReleaseNotes>

View File

@@ -56,10 +56,9 @@
<ReleaseNotes>
Версия __VERSION_NUMBER__
Наконец-то появилась возможность поиска любых параметров!
Новый собственный редактор для настраиваемых сочетаний клавиш, действий и записей палитры команд.
Новые локализации сообщества на сербский и украинский языки
Поддержка протокола клавиатуры Kitty для высокоточного кодирования ввода
Новая страница расширений, на которой отображается информация о том, что было установлено в вашем терминале
Палитра команд теперь доступна на вашем языке, а также на английском
Новые функции VT, например синхронизированная отрисовка, новые цветовые схемы, настройка быстрых действий мыши, таких как масштабирование, и т. д.
Дополнительные сведения см. на странице выпусков GitHub.
</ReleaseNotes>

View File

@@ -1,182 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<ProductDescription language="sr-cyrl-rs" xmlns="http://schemas.microsoft.com/appx/2012/ProductDescription" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xml:lang="en-us" Release="">
<AppStoreName _locID="App_AppStoreName">
<!-- This is optional. AppStoreName is typically extracted from your package's AppxManifest DisplayName property. -->
<!-- Uncomment (and localize) this Store name if your application package does not contain a localization for the DisplayName in this language. -->
<!-- Leaving this uncommented for a language that your application package DOES contain a DisplayName for will result in a submission failure with the API. -->
<!-- _locComment_text="{MaxLength=200} App AppStoreName" -->
<!-- Windows Terminal -->
</AppStoreName>
<Keywords>
<!-- Valid length: 30 character limit, up to 7 elements -->
<Keyword _locID="App_keyword1">
<!-- _locComment_text="{MaxLength=30} App keyword 1" -->Терминал</Keyword>
<Keyword _locID="App_keyword2">
<!-- _locComment_text="{MaxLength=30} App keyword 2" -->Конзола</Keyword>
<Keyword _locID="App_keyword3">
<!-- _locComment_text="{MaxLength=30} App keyword 3" -->
</Keyword>
<Keyword _locID="App_keyword4">
<!-- _locComment_text="{MaxLength=30} App keyword 4" -->
</Keyword>
<Keyword _locID="App_keyword5">
<!-- _locComment_text="{MaxLength=30} App keyword 5" -->
</Keyword>
<Keyword _locID="App_keyword6">
<!-- _locComment_text="{MaxLength=30} App keyword 6" -->
</Keyword>
<Keyword _locID="App_keyword7">
<!-- _locComment_text="{MaxLength=30} App keyword 7" -->
</Keyword>
</Keywords>
<Description _locID="App_Description">
<!-- _locComment_text="{MaxLength=10000} App Description" -->Ово је изградња прегледа апликације Windows терминал. Она садржи најновије могућности које се још увек развијају. Windows терминал је модерна, брза, ефикасна, моћна и продуктивна апликација терминала за кориснике алата из командне линије и љуски као што су Command Prompt, PowerShell, и WSL. Неке од његових главних функционалности су вишеструке картице, панели, подршка за Уникод и UTF-8, GPU убрзани механизам за исцртавање текста, произвољне теме, стилови и конфигурације.
Ово је пројекат отвореног кода и учешће заједнице је добродошло. Ако желите да учествујете, молимо вас да посетите https://github.com/microsoft/terminal </Description>
<ShortDescription _locID="App_ShortDescription">
<!-- Only used for games. This description appears in the Information section of the Game Hub on Xbox One, and helps customers understand more about your game. -->
<!-- _locComment_text="{MaxLength=500} App ShortDescription" -->
</ShortDescription>
<ShortTitle _locID="App_ShortTitle">
<!-- A shorter version of your product's name. If provided, this shorter name may appear in various places on Xbox One (during installation, in Achievements, etc.) in place of the full title of your product. -->
<!-- _locComment_text="{MaxLength=50} App ShortTitle" -->
</ShortTitle>
<SortTitle _locID="App_SortTitle">
<!-- If your product could be alphabetized in different ways, you can enter another version here. This may help customers find the product more quickly when searching. -->
<!-- _locComment_text="{MaxLength=255} App SortTitle" -->
</SortTitle>
<VoiceTitle _locID="App_VoiceTitle">
<!-- An alternate name for your product that, if provided, may be used in the audio experience on Xbox One when using Kinect or a headset. -->
<!-- _locComment_text="{MaxLength=255} App VoiceTitle" -->
</VoiceTitle>
<DevStudio _locID="App_DevStudio">
<!-- Specify this value if you want to include a "Developed by" field in the listing. (The "Published by" field will list the publisher display name associated with your account, whether or not you provide a devStudio value.) -->
<!-- _locComment_text="{MaxLength=255} App DevStudio" -->
</DevStudio>
<ReleaseNotes _locID="App_ReleaseNotes">
<!-- _locComment_text="{MaxLength=1500} {Locked=__VERSION_NUMBER__}{Locked=wt.exe}{Locked=Kitty} App Release Note" -->Верзија __VERSION_NUMBER__
- Коначно, могућност претраге било ког подешавања!
- Нови својствени едитор ставки пречица на тастатури, акција и командне палете
- Нова локализација заједнице на српски и украјински језик
- Подршка за „Kitty” протокол тастатуре који омогућава верно кодирање уноса
За више детаља, молимо вас да посетите нашу GitHub страницу издања.
</ReleaseNotes>
<ScreenshotCaptions>
<!-- Valid length: 200 character limit, up to 9 elements per platform -->
<!-- Valid attributes: any of DesktopImage, MobileImage, XboxImage, SurfaceHubImage, and HoloLensImage -->
<Caption DesktopImage="acrylic-emoji.png" _locID="App_caption1">
<!-- _locComment_text="{MaxLength=200} Screenshot caption 1" -->
</Caption>
<Caption DesktopImage="panes.png" _locID="App_caption2">
<!-- _locComment_text="{MaxLength=200} Screenshot caption 2" -->
</Caption>
<Caption DesktopImage="htop.png" _locID="App_caption3">
<!-- _locComment_text="{MaxLength=200} Screenshot caption 3" -->
</Caption>
</ScreenshotCaptions>
<AdditionalAssets>
<!-- Valid elements:-->
<!-- HeroImage414x180, HeroImage846x468, HeroImage558x756, HeroImage414x468, HeroImage558x558, HeroImage2400x1200,-->
<!-- ScreenshotWXGA, ScreenshotHD720, ScreenshotWVGA, Doublewide, Panoramic, Square,-->
<!-- SmallMobileTile, SmallXboxLiveTile, LargeMobileTile, LargeXboxLiveTile, Tile,-->
<!-- DesktopIcon, Icon (use this value for the 1:1 300x300 pixels logo), AchievementIcon,-->
<!-- ChallengePromoIcon, RewardDisplayIcon, Icon150X150, Icon71X71,-->
<!-- BoxArt, BrandedKeyArt, PosterArt, FeaturedPromotionalArt, PromotionalArt16x9, TitledHeroArt-->
<!-- There is no content for any of these elements, just a single attribute called FileName. -->
<PosterArt FileName="Store Poster Art.png" />
<BoxArt FileName="Store Box Art.png" />
<PromotionalArt16x9 FileName="Store Thumbnail.png" />
</AdditionalAssets>
<Trailers>
<!-- Maximum number of trailers permitted: 15 -->
<Trailer FileName="CC0605_CommandLine_Teaser_WEB_MASTER_H264_1080p_23.976_-16LKFS_-3dbTP_ST.mp4">
<Title _locID="App_trailerTitle1">
<!-- _locComment_text="{MaxLength=255} Trailer title 1" -->Нови Windows терминал</Title>
<Images>
<!-- Current maximum of 1 image per trailer permitted. -->
<Image FileName="Store Thumbnail.png">
<!-- _locComment_text="{Locked} Trailer screenshot 1 description" -->
</Image>
</Images>
</Trailer>
</Trailers>
<AppFeatures>
<!-- Valid length: 200 character limit, up to 20 elements -->
<AppFeature _locID="App_feature1">
<!-- _locComment_text="{MaxLength=200} App Feature 1" -->Вишеструке картице</AppFeature>
<AppFeature _locID="App_feature2">
<!-- _locComment_text="{MaxLength=200} App Feature 2" -->Пуна Уникод подршка</AppFeature>
<AppFeature _locID="App_feature3">
<!-- _locComment_text="{MaxLength=200} App Feature 3" -->GPU-убрзано исцртавање текста</AppFeature>
<AppFeature _locID="App_feature4">
<!-- _locComment_text="{MaxLength=200} App Feature 4" -->Потпуна прилагодљивост</AppFeature>
<AppFeature _locID="App_feature5">
<!-- _locComment_text="{MaxLength=200} App Feature 5" -->Подела панела</AppFeature>
<AppFeature _locID="App_feature6">
<!-- _locComment_text="{MaxLength=200} App Feature 6" -->
</AppFeature>
<AppFeature _locID="App_feature7">
<!-- _locComment_text="{MaxLength=200} App Feature 7" -->
</AppFeature>
<AppFeature _locID="App_feature8">
<!-- _locComment_text="{MaxLength=200} App Feature 8" -->
</AppFeature>
<AppFeature _locID="App_feature9">
<!-- _locComment_text="{MaxLength=200} App Feature 9" -->
</AppFeature>
<AppFeature _locID="App_feature10">
<!-- _locComment_text="{MaxLength=200} App Feature 10" -->
</AppFeature>
<AppFeature _locID="App_feature11">
<!-- _locComment_text="{MaxLength=200} App Feature 11" -->
</AppFeature>
<AppFeature _locID="App_feature12">
<!-- _locComment_text="{MaxLength=200} App Feature 12" -->
</AppFeature>
<AppFeature _locID="App_feature13">
<!-- _locComment_text="{MaxLength=200} App Feature 13" -->
</AppFeature>
<AppFeature _locID="App_feature14">
<!-- _locComment_text="{MaxLength=200} App Feature 14" -->
</AppFeature>
<AppFeature _locID="App_feature15">
<!-- _locComment_text="{MaxLength=200} App Feature 15" -->
</AppFeature>
<AppFeature _locID="App_feature16">
<!-- _locComment_text="{MaxLength=200} App Feature 16" -->
</AppFeature>
<AppFeature _locID="App_feature17">
<!-- _locComment_text="{MaxLength=200} App Feature 17" -->
</AppFeature>
<AppFeature _locID="App_feature18">
<!-- _locComment_text="{MaxLength=200} App Feature 18" -->
</AppFeature>
<AppFeature _locID="App_feature19">
<!-- _locComment_text="{MaxLength=200} App Feature 19" -->
</AppFeature>
<AppFeature _locID="App_feature20">
<!-- _locComment_text="{MaxLength=200} App Feature 20" -->
</AppFeature>
</AppFeatures>
<RecommendedHardware>
<!-- Valid length: 200 character limit, up to 11 elements -->
<Recommendation _locID="App_RecommendedHW1">
<!-- _locComment_text="{MaxLength=200} App Recommended Hardware 1" -->Тастатура</Recommendation>
</RecommendedHardware>
<MinimumHardware>
<!-- Valid length: 200 character limit, up to 11 elements -->
</MinimumHardware>
<CopyrightAndTrademark _locID="App_CopyrightandTrademark">
<!-- _locComment_text="{MaxLength=200} Copyright and Trademark" -->Copyright (c) Microsoft Corporation</CopyrightAndTrademark>
<AdditionalLicenseTerms _locID="App_AdditionalLicenseTerms">
<!-- _locComment_text="{MaxLength=10000} Additional License Terms" -->
</AdditionalLicenseTerms>
<WebsiteURL _locID="App_WebsiteURL">
<!-- _locComment_text="{MaxLength=2048} WebsiteURL" -->https://github.com/microsoft/terminal</WebsiteURL>
<SupportContactInfo _locID="App_SupportContactInfo">
<!-- _locComment_text="{MaxLength=2048} Support Contact Info" -->https://github.com/microsoft/terminal/issues/new</SupportContactInfo>
<PrivacyPolicyURL _locID="App_PrivacyURL">
<!-- _locComment_text="{MaxLength=2048} Privacy Policy URL" -->https://go.microsoft.com/fwlink/?LinkID=521839</PrivacyPolicyURL>
</ProductDescription>

View File

@@ -56,10 +56,9 @@
<ReleaseNotes _locID="App_ReleaseNotes">
<!-- _locComment_text="{MaxLength=1500} {Locked=__VERSION_NUMBER__}{Locked=wt.exe} App Release Note" -->Версія __VERSION_NUMBER__
- Нарешті, можливість пошуку будь-якого налаштування!
- Новий вбудований редактор для прив'язки клавіш, дій та палітри команд.
- Нові локалізації спільноти на сербську та українську мови.
- Підтримка протоколу клавіатури "Kitty" для високоточного кодування введення.
- Цілком нова сторінка розширень, яка показує, що було встановлено у вашому терміналі
- Палітра команд тепер відображається вашою рідною мовою, а також англійською
- Нові функції віртуального автомата, такі як синхронізований рендеринг, нові колірні схеми, налаштування для швидких дій миші, таких як масштабування, тощо
Будь ласка, перегляньте нашу сторінку релізів GitHub для отримання додаткової інформації.
</ReleaseNotes>

View File

@@ -56,10 +56,9 @@
<ReleaseNotes>
Version __VERSION_NUMBER__
- 终于可以搜索任何设置了!
- 新增用于键绑定、操作和命令面板条目的原生编辑器。
- 新增塞尔维亚语和乌克兰语社区本地化支持
- 支持 "Kitty" 键盘协议,实现高保真输入编码
- 一个全新的“扩展”页,显示已安装到终端的内容
- 命令面板现在以你的母语和英语显示
- 新的 VT 功能,例如同步渲染、新配色方案、快速鼠标操作(如缩放)的配置等
有关其他详细信息,请参阅我们的 GitHub 发布页面。
</ReleaseNotes>

View File

@@ -56,10 +56,9 @@
<ReleaseNotes>
Version __VERSION_NUMBER__
- 終於,提供可搜尋任何設定的功能!
- 全新原生編輯器,支援按鍵繫結、動作及命令選擇區項目。
- 新增社群本地語系化,包含塞爾維亞語與烏克蘭語
- 支援高保真度輸入編碼的「Kitty」鍵盤通訊協定
- 全新的延伸模組頁面會顯示已安裝在您終端機中的內容
- 命令選擇區現在以您的母語和英文顯示
- 新的 VT 功能,例如同步轉譯、新的色彩配置、快速滑鼠動作 (例如縮放) 設定等等
如需更多詳細資料,請參閱我們的 GitHub 發行版本頁面。
</ReleaseNotes>

View File

@@ -56,9 +56,9 @@ Dies ist ein Open Source-Projekt, und wir freuen uns über die Teilnahme an der
<ReleaseNotes>
Version __VERSION_NUMBER__
Eine komplett neue Erweiterungsseite, die anzeigt, was in Ihrem Terminal installiert ist
Die Befehlspalette wird jetzt sowohl in Ihrer Muttersprache als auch auf Englisch angezeigt
Neue VT-Features wie synchronisiertes Rendering, neue Farbschemas, Konfiguration für schnelle Mausaktionen wie Zoomen und mehr
Wir haben der Benutzeroberfläche Dutzende von Einstellungen hinzugefügt, die nur einmal in der JSON-Datei vorhanden waren, einschließlich einer neuen Seite zum Anpassen des Layouts Ihres Menüs „Neue Registerkarte“!
Wir haben die Fensterverwaltung umgestaltet, um die Zuverlässigkeit zu verbessern. Melden Sie alle Fehler, die beim alias „wt.exe“ auftreten
Profile zeigen jetzt ein Symbol an, wenn sie ausgeblendet wurden oder auf Programme verweisen, die deinstalliert wurden.
Weitere Informationen finden Sie auf unserer GitHub-Releaseseite.
</ReleaseNotes>

View File

@@ -56,9 +56,9 @@ This is an open source project and we welcome community participation. To partic
<ReleaseNotes _locID="App_ReleaseNotes">
<!-- _locComment_text="{MaxLength=1500} {Locked=__VERSION_NUMBER__}{Locked=wt.exe} App Release Note" -->Version __VERSION_NUMBER__
- A whole new Extensions page that shows what has been installed into your Terminal
- Command Palette now shows up in your native language as well as English
- New VT features such as synchronized rendering, new color schemes, configuration for quick mouse actions like zooming, and more
- We've added dozens of settings to the UI that once only existed in the JSON file, including a new page for customizing the layout of your New Tab menu!
- We have rearchitected window management to improve reliability; please file any bugs you encounter with the wt.exe alias
- Profiles now show an icon if they've been hidden or refer to programs which were uninstalled.
Please see our GitHub releases page for additional details.
</ReleaseNotes>

View File

@@ -56,9 +56,9 @@ Este es un proyecto de fuente abierta y animamos a la comunidad a participar. Pa
<ReleaseNotes>
Versión __VERSION_NUMBER__
- Página Extensiones completamente nueva que muestra lo que se ha instalado en tu terminal
- La paleta de comandos ahora se muestra en tu idioma nativo, así como en inglés
- Nuevas características de VT, como la representación sincronizada, nuevos esquemas de color, configuración para acciones rápidas del ratón, como el zoom, y más
- Hemos añadido decenas de configuraciones a la interfaz de usuario que antes solo existían en el archivo JSON, incluida una nueva página para personalizar el diseño del menú Nueva pestaña.
- Hemos reestructurado la gestión de ventanas para mejorar la fiabilidad; informe de cualquier error que encuentre con el alias wt.exe
- Ahora, los perfiles muestran un icono si han sido ocultados o hacen referencia a programas que han sido desinstalados.
Consulte la página de versiones de GitHub para más información.
</ReleaseNotes>

View File

@@ -56,11 +56,11 @@ Il sagit dun projet open source et nous encourageons la participation à l
<ReleaseNotes>
Version __VERSION_NUMBER__
- Une toute nouvelle page Extensions qui affiche ce qui a été installé dans votre Terminal
- La palette de commandes saffiche désormais dans votre langue native, ainsi quen anglais
- De nouvelles fonctionnalités VT, telles que le rendu synchronisé, de nouveaux schémas de couleurs, une configuration pour des actions rapides de la souris comme le zoom, et bien plus encore
- Nous avons ajouté des dizaines de paramètres à linterface utilisateur qui nexistaient auparavant que dans le fichier JSON, y compris une nouvelle page pour personnaliser la disposition de votre menu Nouvel onglet.
- Nous avons fait une refonte de la gestion des fenêtres pour améliorer la fiabilité. Veuillez signaler les bogues que vous rencontrez avec lalias wt.exe.
- Les profils affichent désormais une icône sils ont été masqués ou sils font référence à des programmes qui ont été désinstallés.
Consultez notre page des versions de GitHub pour plus de détails.
Veuillez consulter notre page des versions GitHub pour découvrir dautres détails.
</ReleaseNotes>
<ScreenshotCaptions>
<!-- Valid length: 200 character limit, up to 9 elements per platform -->

View File

@@ -56,9 +56,9 @@ Si tratta di un progetto open source e la partecipazione della community è molt
<ReleaseNotes>
Versione __VERSION_NUMBER__
- Una pagina Estensioni completamente nuova che mostra ciò che è stato installato nel terminale
- Il riquadro comandi ora viene visualizzato nella tua lingua di origine oltre che in inglese
- Nuove funzionalità VT come il rendering sincronizzato, le nuove combinazioni di colori, la configurazione per azioni rapide del mouse come lo zoom e altro ancora
- Abbiamo aggiunto decine di impostazioni all'interfaccia utente che in precedenza esistevano solo nel file JSON, inclusa una nuova pagina per personalizzare il layout del menu Nuova scheda.
- Abbiamo riprogettato la gestione delle finestre per migliorarne l'affidabilità; segnala eventuali bug riscontrati con l'alias wt.exe
- I profili ora mostrano un'icona se sono stati nascosti o se fanno riferimento a programmi disinstallati.
Per altri dettagli, vedi la pagina delle release di GitHub.
</ReleaseNotes>

View File

@@ -56,9 +56,9 @@
<ReleaseNotes>
バージョン __VERSION_NUMBER__
- お使いのターミナルに何がインストールされているかを表示する新しい [拡張機能] ページ
- コマンド パレットがネイティブ言語と英語で表示されるようになりました
- 同期レンダリング、新しい配色、ズームなどのクイック マウス操作の構成などの、新しい VT 機能
- 新しいタブ メニューのレイアウトをカスタマイズするための新しいページなど、以前は JSON ファイルにしかなかった設定が UI に多数追加されました。
- 信頼性を向上させるために、ウィンドウ管理を再設計しました。wt.exe エイリアスで発生したバグを報告してください
- プロファイルが非表示になっている場合や、アンインストールされたプログラムを参照している場合に、アイコンが表示されるようになりました。
詳細については、GitHub リリース ページをご覧ください。
</ReleaseNotes>

View File

@@ -56,11 +56,11 @@
<ReleaseNotes>
버전 __VERSION_NUMBER__
- 터미널에 설치된 항목을 보여 주는 완전히 새로운 확장 페이지
- 이제 영어뿐만 아니라 모국어로도 표시되는 명령 팔레트
- 동기화된 렌더링, 새로운 색 구성표, 확대/축소와 같은 빠른 마우스 동작을 위한 구성 등 새로운 VT 기능 추가
- 새 탭 메뉴의 레이아웃을 사용자 지정하기 위한 새 페이지를 포함하여 JSON 파일에만 존재했던 수십 개의 설정을 UI에 추가
- 안정성을 개선하기 위해 창 관리 구조를 재구성했습니다. wt.exe 별칭과 관련하여 발생한 버그 신고
- 프로필이 숨겨졌거나 제거된 프로그램을 참조하는 경우 이제 프로필에 아이콘이 표시됩니다.
자세한 정보는 GitHub 릴리스 페이지를 참하세요.
자세한 내용은 GitHub 릴리스 페이지를 참하세요.
</ReleaseNotes>
<ScreenshotCaptions>
<!-- Valid length: 200 character limit, up to 9 elements per platform -->

View File

@@ -56,9 +56,9 @@ Este é um projeto de código aberto e a participação da comunidade é bem-vin
<ReleaseNotes>
Version __VERSION_NUMBER__
Uma nova página de Extensões que mostra o que foi instalado no seu Terminal
A Paleta de Comandos agora aparece no seu idioma nativo, além do inglês
Novos recursos da VT, como renderização sincronizada, novos esquemas de cores, configuração para ações rápidas do mouse, como zoom, e muito mais
Adicionamos várias configurações à interface do usuário que antes só existiam no arquivo JSON, incluindo uma nova página para personalizar o layout do seu menu Nova Guia!
Reestruturamos o gerenciamento de janelas para melhorar a confiabilidade; registre os bugs que você encontrar com o alias wt.exe
Os perfis agora exibem um ícone se estiverem ocultos ou se referirem a programas que foram desinstalados.
Confira nossa página de lançamentos no GitHub para obter mais detalhes.
</ReleaseNotes>

View File

@@ -56,9 +56,9 @@
<ReleaseNotes>
Версия __VERSION_NUMBER__
Новая страница расширений, на которой отображается информация о том, что было установлено в вашем терминале
Палитра команд теперь доступна на вашем языке, а также на английском
Новые функции VT, например синхронизированная отрисовка, новые цветовые схемы, настройка быстрых действий мыши, таких как масштабирование, и т. д.
Мы добавили в пользовательский интерфейс десятки параметров, которые ранее существовали только в JSON-файле, включая новую страницу для настройки макета меню новой вкладки.
Мы переработали управление окнами для повышения надежности. Сообщайте о любых ошибках, которые вы обнаружите с псевдонимом wt.exe
Профили теперь отображают значок, если они были скрыты или ссылаются на программы, которые были удалены.
Дополнительные сведения см. на странице выпусков GitHub.
</ReleaseNotes>

View File

@@ -1,181 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<ProductDescription language="sr-cyrl-rs" xmlns="http://schemas.microsoft.com/appx/2012/ProductDescription" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xml:lang="en-us" Release="">
<AppStoreName _locID="App_AppStoreName">
<!-- This is optional. AppStoreName is typically extracted from your package's AppxManifest DisplayName property. -->
<!-- Uncomment (and localize) this Store name if your application package does not contain a localization for the DisplayName in this language. -->
<!-- Leaving this uncommented for a language that your application package DOES contain a DisplayName for will result in a submission failure with the API. -->
<!-- _locComment_text="{MaxLength=200} App AppStoreName" -->
<!-- Windows Terminal -->
</AppStoreName>
<Keywords>
<!-- Valid length: 30 character limit, up to 7 elements -->
<Keyword _locID="App_keyword1">
<!-- _locComment_text="{MaxLength=30} App keyword 1" -->Терминал</Keyword>
<Keyword _locID="App_keyword2">
<!-- _locComment_text="{MaxLength=30} App keyword 2" -->Конзола</Keyword>
<Keyword _locID="App_keyword3">
<!-- _locComment_text="{MaxLength=30} App keyword 3" -->
</Keyword>
<Keyword _locID="App_keyword4">
<!-- _locComment_text="{MaxLength=30} App keyword 4" -->
</Keyword>
<Keyword _locID="App_keyword5">
<!-- _locComment_text="{MaxLength=30} App keyword 5" -->
</Keyword>
<Keyword _locID="App_keyword6">
<!-- _locComment_text="{MaxLength=30} App keyword 6" -->
</Keyword>
<Keyword _locID="App_keyword7">
<!-- _locComment_text="{MaxLength=30} App keyword 7" -->
</Keyword>
</Keywords>
<Description _locID="App_Description">
<!-- _locComment_text="{MaxLength=10000} App Description" -->Windows терминал је модерна, брза, ефикасна, моћна и продуктивна апликација терминала за кориснике алата из командне линије и љуски као што су Command Prompt, PowerShell, и WSL. Неке од његових главних функционалности су вишеструке картице, панели, подршка за Уникод и UTF-8, GPU убрзани механизам за исцртавање текста, произвољне теме, стилови и конфигурације.
Ово је пројекат отвореног кода и учешће заједнице је добродошло. Ако желите да учествујете, молимо вас да посетите https://github.com/microsoft/terminal </Description>
<ShortDescription _locID="App_ShortDescription">
<!-- Only used for games. This description appears in the Information section of the Game Hub on Xbox One, and helps customers understand more about your game. -->
<!-- _locComment_text="{MaxLength=500} App ShortDescription" -->
</ShortDescription>
<ShortTitle _locID="App_ShortTitle">
<!-- A shorter version of your product's name. If provided, this shorter name may appear in various places on Xbox One (during installation, in Achievements, etc.) in place of the full title of your product. -->
<!-- _locComment_text="{MaxLength=50} App ShortTitle" -->
</ShortTitle>
<SortTitle _locID="App_SortTitle">
<!-- If your product could be alphabetized in different ways, you can enter another version here. This may help customers find the product more quickly when searching. -->
<!-- _locComment_text="{MaxLength=255} App SortTitle" -->
</SortTitle>
<VoiceTitle _locID="App_VoiceTitle">
<!-- An alternate name for your product that, if provided, may be used in the audio experience on Xbox One when using Kinect or a headset. -->
<!-- _locComment_text="{MaxLength=255} App VoiceTitle" -->
</VoiceTitle>
<DevStudio _locID="App_DevStudio">
<!-- Specify this value if you want to include a "Developed by" field in the listing. (The "Published by" field will list the publisher display name associated with your account, whether or not you provide a devStudio value.) -->
<!-- _locComment_text="{MaxLength=255} App DevStudio" -->
</DevStudio>
<ReleaseNotes _locID="App_ReleaseNotes">
<!-- _locComment_text="{MaxLength=1500} {Locked=__VERSION_NUMBER__}{Locked=wt.exe} App Release Note" -->Верзија __VERSION_NUMBER__
- Попуно нова страница Проширења која приказује шта је све инсталирано у ваш Терминал
- Палета команди се сада приказује и на вашем матерњем језику, као и на енглеском
- Нове VT функционалности као што су синхронизовано исцртавање, нове шеме боја, конфигурација за брзе акције мишем, као што је зумирање, и још тога
За више детаља, молимо вас да посетите нашу GitHub страницу издања.
</ReleaseNotes>
<ScreenshotCaptions>
<!-- Valid length: 200 character limit, up to 9 elements per platform -->
<!-- Valid attributes: any of DesktopImage, MobileImage, XboxImage, SurfaceHubImage, and HoloLensImage -->
<Caption DesktopImage="acrylic-emoji.png" _locID="App_caption1">
<!-- _locComment_text="{MaxLength=200} Screenshot caption 1" -->
</Caption>
<Caption DesktopImage="panes.png" _locID="App_caption2">
<!-- _locComment_text="{MaxLength=200} Screenshot caption 2" -->
</Caption>
<Caption DesktopImage="htop.png" _locID="App_caption3">
<!-- _locComment_text="{MaxLength=200} Screenshot caption 3" -->
</Caption>
</ScreenshotCaptions>
<AdditionalAssets>
<!-- Valid elements:-->
<!-- HeroImage414x180, HeroImage846x468, HeroImage558x756, HeroImage414x468, HeroImage558x558, HeroImage2400x1200,-->
<!-- ScreenshotWXGA, ScreenshotHD720, ScreenshotWVGA, Doublewide, Panoramic, Square,-->
<!-- SmallMobileTile, SmallXboxLiveTile, LargeMobileTile, LargeXboxLiveTile, Tile,-->
<!-- DesktopIcon, Icon (use this value for the 1:1 300x300 pixels logo), AchievementIcon,-->
<!-- ChallengePromoIcon, RewardDisplayIcon, Icon150X150, Icon71X71,-->
<!-- BoxArt, BrandedKeyArt, PosterArt, FeaturedPromotionalArt, PromotionalArt16x9, TitledHeroArt-->
<!-- There is no content for any of these elements, just a single attribute called FileName. -->
<PosterArt FileName="Store Poster Art.png" />
<BoxArt FileName="Store Box Art.png" />
<PromotionalArt16x9 FileName="Store Thumbnail.png" />
</AdditionalAssets>
<Trailers>
<!-- Maximum number of trailers permitted: 15 -->
<Trailer FileName="CC0605_CommandLine_Teaser_WEB_MASTER_H264_1080p_23.976_-16LKFS_-3dbTP_ST.mp4">
<Title _locID="App_trailerTitle1">
<!-- _locComment_text="{MaxLength=255} Trailer title 1" -->Нови Windows терминал</Title>
<Images>
<!-- Current maximum of 1 image per trailer permitted. -->
<Image FileName="Store Thumbnail.png">
<!-- _locComment_text="{Locked} Trailer screenshot 1 description" -->
</Image>
</Images>
</Trailer>
</Trailers>
<AppFeatures>
<!-- Valid length: 200 character limit, up to 20 elements -->
<AppFeature _locID="App_feature1">
<!-- _locComment_text="{MaxLength=200} App Feature 1" -->Вишеструке картице</AppFeature>
<AppFeature _locID="App_feature2">
<!-- _locComment_text="{MaxLength=200} App Feature 2" -->Пуна Уникод подршка</AppFeature>
<AppFeature _locID="App_feature3">
<!-- _locComment_text="{MaxLength=200} App Feature 3" -->GPU-убрзано исцртавање текста</AppFeature>
<AppFeature _locID="App_feature4">
<!-- _locComment_text="{MaxLength=200} App Feature 4" -->Потпуна прилагодљивост</AppFeature>
<AppFeature _locID="App_feature5">
<!-- _locComment_text="{MaxLength=200} App Feature 5" -->Подела панела</AppFeature>
<AppFeature _locID="App_feature6">
<!-- _locComment_text="{MaxLength=200} App Feature 6" -->
</AppFeature>
<AppFeature _locID="App_feature7">
<!-- _locComment_text="{MaxLength=200} App Feature 7" -->
</AppFeature>
<AppFeature _locID="App_feature8">
<!-- _locComment_text="{MaxLength=200} App Feature 8" -->
</AppFeature>
<AppFeature _locID="App_feature9">
<!-- _locComment_text="{MaxLength=200} App Feature 9" -->
</AppFeature>
<AppFeature _locID="App_feature10">
<!-- _locComment_text="{MaxLength=200} App Feature 10" -->
</AppFeature>
<AppFeature _locID="App_feature11">
<!-- _locComment_text="{MaxLength=200} App Feature 11" -->
</AppFeature>
<AppFeature _locID="App_feature12">
<!-- _locComment_text="{MaxLength=200} App Feature 12" -->
</AppFeature>
<AppFeature _locID="App_feature13">
<!-- _locComment_text="{MaxLength=200} App Feature 13" -->
</AppFeature>
<AppFeature _locID="App_feature14">
<!-- _locComment_text="{MaxLength=200} App Feature 14" -->
</AppFeature>
<AppFeature _locID="App_feature15">
<!-- _locComment_text="{MaxLength=200} App Feature 15" -->
</AppFeature>
<AppFeature _locID="App_feature16">
<!-- _locComment_text="{MaxLength=200} App Feature 16" -->
</AppFeature>
<AppFeature _locID="App_feature17">
<!-- _locComment_text="{MaxLength=200} App Feature 17" -->
</AppFeature>
<AppFeature _locID="App_feature18">
<!-- _locComment_text="{MaxLength=200} App Feature 18" -->
</AppFeature>
<AppFeature _locID="App_feature19">
<!-- _locComment_text="{MaxLength=200} App Feature 19" -->
</AppFeature>
<AppFeature _locID="App_feature20">
<!-- _locComment_text="{MaxLength=200} App Feature 20" -->
</AppFeature>
</AppFeatures>
<RecommendedHardware>
<!-- Valid length: 200 character limit, up to 11 elements -->
<Recommendation _locID="App_RecommendedHW1">
<!-- _locComment_text="{MaxLength=200} App Recommended Hardware 1" -->Тастатура</Recommendation>
</RecommendedHardware>
<MinimumHardware>
<!-- Valid length: 200 character limit, up to 11 elements -->
</MinimumHardware>
<CopyrightAndTrademark _locID="App_CopyrightandTrademark">
<!-- _locComment_text="{MaxLength=200} Copyright and Trademark" -->Copyright (c) Microsoft Corporation</CopyrightAndTrademark>
<AdditionalLicenseTerms _locID="App_AdditionalLicenseTerms">
<!-- _locComment_text="{MaxLength=10000} Additional License Terms" -->
</AdditionalLicenseTerms>
<WebsiteURL _locID="App_WebsiteURL">
<!-- _locComment_text="{MaxLength=2048} WebsiteURL" -->https://github.com/microsoft/terminal</WebsiteURL>
<SupportContactInfo _locID="App_SupportContactInfo">
<!-- _locComment_text="{MaxLength=2048} Support Contact Info" -->https://github.com/microsoft/terminal/issues/new</SupportContactInfo>
<PrivacyPolicyURL _locID="App_PrivacyURL">
<!-- _locComment_text="{MaxLength=2048} Privacy Policy URL" -->https://go.microsoft.com/fwlink/?LinkID=521839</PrivacyPolicyURL>
</ProductDescription>

View File

@@ -56,9 +56,9 @@
<ReleaseNotes _locID="App_ReleaseNotes">
<!-- _locComment_text="{MaxLength=1500} {Locked=__VERSION_NUMBER__}{Locked=wt.exe} App Release Note" -->Версія __VERSION_NUMBER__
- Цілком нова сторінка розширень, яка показує, що було встановлено у вашому Терміналі
- Палітра команд тепер відображається вашою рідною мовою, так само, як і англійською
- Нові VT функції, такі як синхронізований рендеринг, нові колірні схеми, налаштування для швидких дій миші, таких як масштабування, тощо
- Ми додали десятки налаштувань до інтерфейсу користувача, які раніше існували лише у файлі JSON, включаючи нову сторінку для налаштування макета меню «Нова вкладка»!
- Ми переробили архітектуру керування вікнами для підвищення надійності; будь ласка, повідомляйте про будь-які помилки, з якими ви зіткнулися, за допомогою псевдоніма wt.exe.
- Профілі тепер відображають значок, якщо вони були приховані, або посилаються на програми, які було видалено.
Будь ласка, перегляньте нашу сторінку релізів GitHub для отримання додаткової інформації.
</ReleaseNotes>

View File

@@ -56,9 +56,9 @@
<ReleaseNotes>
Version __VERSION_NUMBER__
- 一个全新的“扩展”页,显示已安装到终端的内容
- 命令面板现在以你的母语和英语显示
- 新的 VT 功能,例如同步渲染、新配色方案、快速鼠标操作(如缩放)的配置等
- 我们向用户界面添加了许多之前仅存在于 JSON 文件中的设置,包括用于自定义“新建标签页”菜单布局的新页面!
- 我们已重新架构窗口管理以提高可靠性; 请使用 wt.exe 别名提交您遇到的任何错误
- 配置文件如果已被隐藏或引用了已卸载的程序,现在会显示一个图标。
有关其他详细信息,请参阅我们的 GitHub 发布页面。
</ReleaseNotes>

View File

@@ -56,9 +56,9 @@
<ReleaseNotes>
Version __VERSION_NUMBER__
- 全新的延伸模組頁面會顯示已安裝在您終端機中的內容
- 命令選擇區現在以您的母語和英文顯示
- 新的 VT 功能,例如同步轉譯、新的色彩配置、快速滑鼠動作 (例如縮放) 設定等等
- 我們已在使用者介面中新增數十個曾經僅存在於 JSON 檔案中的設定,包括一個可自訂新索引標籤選單版面配置的新頁面!
- 我們已重新架構視窗管理以提升可靠性; 如果您在使用 wt.exe 別名時遇到任何錯誤,請提交錯誤回報
- 如果設定檔已隱藏或參照已解除安裝的程式,現在會顯示圖示。
如需更多詳細資料,請參閱我們的 GitHub 發行版本頁面。
</ReleaseNotes>

View File

@@ -9,7 +9,7 @@
<PropertyGroup>
<!-- Optional, defaults to main. Name of the branch which will be used for calculating branch point. -->
<PGOBranch>main</PGOBranch>
<PGOBranch>release-1.25</PGOBranch>
<!-- Mandatory. Name of the NuGet package which will contain PGO databases for consumption by build system. -->
<PGOPackageName>Microsoft.Internal.Windows.Terminal.PGODatabase</PGOPackageName>

View File

@@ -5,7 +5,7 @@
<XesUseOneStoreVersioning>true</XesUseOneStoreVersioning>
<XesBaseYearForStoreVersion>2026</XesBaseYearForStoreVersion>
<VersionMajor>1</VersionMajor>
<VersionMinor>26</VersionMinor>
<VersionMinor>25</VersionMinor>
<VersionInfoProductName>Windows Terminal</VersionInfoProductName>
<VersionInfoCulture>1033</VersionInfoCulture>
<!-- The default has a spacing problem -->

View File

@@ -3174,11 +3174,6 @@
"mingw"
],
"type": "string"
},
"dragDropDelimiter": {
"default": " ",
"description": "The delimiter used when dropping multiple files onto the terminal.",
"type": "string"
}
}
},

View File

@@ -219,17 +219,6 @@ til::CoordType TextBuffer::_estimateOffsetOfLastCommittedRow() const noexcept
return std::max(0, gsl::narrow_cast<til::CoordType>(lastRowOffset - 2));
}
bool TextBuffer::_isRowCommitted(til::CoordType y) const noexcept
{
auto offset = (_firstRow + y + 1 /* account for the scratch row */) % _height;
if (offset < 0)
{
offset += _height;
}
const auto row = _buffer.get() + _bufferRowStride * offset;
return row < _commitWatermark;
}
// Retrieves a row from the buffer by its offset from the first row of the text buffer
// (what corresponds to the top row of the screen buffer).
const ROW& TextBuffer::GetRowByOffset(const til::CoordType index) const
@@ -945,10 +934,6 @@ void TextBuffer::ResetLineRenditionRange(const til::CoordType startRow, const ti
LineRendition TextBuffer::GetLineRendition(const til::CoordType row) const
{
if (!_isRowCommitted(row)) [[unlikely]]
{
return LineRendition::SingleWidth;
}
return GetRowByOffset(row).GetLineRendition();
}
@@ -1156,20 +1141,7 @@ DelimiterClass TextBuffer::_GetDelimiterClassAt(const til::point pos, const std:
return GetRowByOffset(realPos.y).DelimiterClassAt(realPos.x, wordDelimiters);
}
// Method Description:
// - Get the start of the word at or before the given position
// - When includeWhitespace is false, returns the start of the current delimiter class run
// (selection behavior: stops at non-wrapped row boundaries)
// - When includeWhitespace is true, also skips backward past any leading ControlChars
// to include the preceding word (accessibility/UIA behavior: crosses all row boundaries)
// Arguments:
// - pos - the buffer position to start from
// - wordDelimiters - characters considered as DelimiterClass::DelimiterChar
// - includeWhitespace - when true, skip past leading whitespace to find the word start
// - limitOptional - (optional) the last possible position in the buffer that can be explored
// Return Value:
// - The position of the first character of the word (inclusive)
til::point TextBuffer::GetWordStart(til::point pos, const std::wstring_view wordDelimiters, bool includeWhitespace, std::optional<til::point> limitOptional) const
til::point TextBuffer::GetWordStart2(til::point pos, const std::wstring_view wordDelimiters, bool includeWhitespace, std::optional<til::point> limitOptional) const
{
const auto bufferSize{ GetSize() };
const auto limit{ limitOptional.value_or(bufferSize.BottomInclusiveRightExclusive()) };
@@ -1202,7 +1174,7 @@ til::point TextBuffer::GetWordStart(til::point pos, const std::wstring_view word
// 1. move to the beginning of the delimiter class run
// 2. (includeWhitespace) if we were on a ControlChar, go back one more delimiter class run
const auto initialDelimiter = bufferSize.IsInBounds(pos) ? _GetDelimiterClassAt(pos, wordDelimiters) : DelimiterClass::ControlChar;
pos = _GetDelimiterClassRunStart(pos, wordDelimiters, includeWhitespace);
pos = _GetDelimiterClassRunStart(pos, wordDelimiters);
if (!includeWhitespace || pos.x == bufferSize.Left())
{
// Special case:
@@ -1213,26 +1185,12 @@ til::point TextBuffer::GetWordStart(til::point pos, const std::wstring_view word
else if (initialDelimiter == DelimiterClass::ControlChar)
{
bufferSize.DecrementInExclusiveBounds(pos);
pos = _GetDelimiterClassRunStart(pos, wordDelimiters, includeWhitespace);
pos = _GetDelimiterClassRunStart(pos, wordDelimiters);
}
return pos;
}
// Method Description:
// - Get the exclusive end of the word at or after the given position
// - When includeWhitespace is false, returns the exclusive end of the current delimiter class run
// (selection behavior: stops at non-wrapped row boundaries)
// - When includeWhitespace is true, also skips forward past any trailing ControlChars
// to include trailing whitespace (accessibility/UIA behavior: crosses all row boundaries)
// - The result is clamped to limitOptional when provided
// Arguments:
// - pos - the buffer position to start from
// - wordDelimiters - characters considered as DelimiterClass::DelimiterChar
// - includeWhitespace - when true, skip past trailing whitespace to find the next word boundary
// - limitOptional - (optional) the last possible position in the buffer that can be explored
// Return Value:
// - The exclusive end position of the word
til::point TextBuffer::GetWordEnd(til::point pos, const std::wstring_view wordDelimiters, bool includeWhitespace, std::optional<til::point> limitOptional) const
til::point TextBuffer::GetWordEnd2(til::point pos, const std::wstring_view wordDelimiters, bool includeWhitespace, std::optional<til::point> limitOptional) const
{
const auto bufferSize{ GetSize() };
const auto limit{ limitOptional.value_or(bufferSize.BottomInclusiveRightExclusive()) };
@@ -1265,12 +1223,8 @@ til::point TextBuffer::GetWordEnd(til::point pos, const std::wstring_view wordDe
// So the heuristic we use is:
// 1. move to the end of the delimiter class run
// 2. (includeWhitespace) if the next delimiter class run is a ControlChar, go forward one more delimiter class run
pos = _GetDelimiterClassRunEnd(pos, wordDelimiters, includeWhitespace);
if (pos >= limit)
{
return limit;
}
else if (!includeWhitespace || pos.x == bufferSize.RightExclusive())
pos = _GetDelimiterClassRunEnd(pos, wordDelimiters);
if (!includeWhitespace || pos.x == bufferSize.RightExclusive())
{
// Special case:
// we're at the right boundary (and end of a delimiter class run),
@@ -1281,8 +1235,7 @@ til::point TextBuffer::GetWordEnd(til::point pos, const std::wstring_view wordDe
if (const auto nextDelimClass = bufferSize.IsInBounds(pos) ? _GetDelimiterClassAt(pos, wordDelimiters) : DelimiterClass::ControlChar;
nextDelimClass == DelimiterClass::ControlChar)
{
pos = _GetDelimiterClassRunEnd(pos, wordDelimiters, includeWhitespace);
return std::min(pos, limit);
return _GetDelimiterClassRunEnd(pos, wordDelimiters);
}
return pos;
}
@@ -1335,48 +1288,29 @@ bool TextBuffer::IsWordBoundary(const til::point pos, const std::wstring_view wo
return prevDelimiterClass != currentDelimiterClass && currentDelimiterClass != DelimiterClass::ControlChar;
}
// Method Description:
// - Get the start position for the current delimiter class run, scanning backward
// - Stops when the delimiter class changes or a row boundary is reached
// - When accessibilityMode is true, freely crosses non-wrapped row boundaries
// - When accessibilityMode is false, only crosses wrap-forced row boundaries
// Arguments:
// - pos - the buffer position to start scanning from
// - wordDelimiters - what characters are we considering for the separation of words
// - accessibilityMode - when true, cross non-wrapped row boundaries freely
// Return Value:
// - The position of the first character in the current delimiter class run (inclusive)
til::point TextBuffer::_GetDelimiterClassRunStart(til::point pos, const std::wstring_view wordDelimiters, const bool accessibilityMode) const
til::point TextBuffer::_GetDelimiterClassRunStart(til::point pos, const std::wstring_view wordDelimiters) const
{
const auto bufferSize = GetSize();
const auto initialDelimClass = bufferSize.IsInBounds(pos) ? _GetDelimiterClassAt(pos, wordDelimiters) : DelimiterClass::ControlChar;
auto nextPos = pos;
while (nextPos != bufferSize.Origin())
for (auto nextPos = pos; nextPos != bufferSize.Origin(); pos = nextPos)
{
bufferSize.DecrementInExclusiveBounds(nextPos);
if (nextPos.x == bufferSize.RightExclusive())
{
// wrapped onto previous line
// wrapped onto previous line,
// check if it was forced to wrap
const auto& row = GetRowByOffset(nextPos.y);
if (!row.WasWrapForced() && !accessibilityMode)
if (!row.WasWrapForced())
{
return pos;
}
// In accessibility mode (or if row was wrap-forced), continue
// across the row boundary. The actual last character of the
// previous row will be checked on the next iteration.
// Don't update pos to avoid storing a transient position
}
else if (_GetDelimiterClassAt(nextPos, wordDelimiters) != initialDelimClass)
{
// if we changed delim class, we're done (don't apply move)
return pos;
}
else
{
pos = nextPos;
}
}
return pos;
}
@@ -1386,8 +1320,7 @@ til::point TextBuffer::_GetDelimiterClassRunStart(til::point pos, const std::wst
// Arguments:
// - pos - the buffer position being within the current delimiter class
// - wordDelimiters - what characters are we considering for the separation of words
// - accessibilityMode - when true, cross non-wrapped row boundaries freely
til::point TextBuffer::_GetDelimiterClassRunEnd(til::point pos, const std::wstring_view wordDelimiters, const bool accessibilityMode) const
til::point TextBuffer::_GetDelimiterClassRunEnd(til::point pos, const std::wstring_view wordDelimiters) const
{
const auto bufferSize = GetSize();
const auto initialDelimClass = bufferSize.IsInBounds(pos) ? _GetDelimiterClassAt(pos, wordDelimiters) : DelimiterClass::ControlChar;
@@ -1400,16 +1333,7 @@ til::point TextBuffer::_GetDelimiterClassRunEnd(til::point pos, const std::wstri
// wrapped onto next line,
// check if it was forced to wrap or switched delimiter class
const auto& row = GetRowByOffset(pos.y);
if (accessibilityMode)
{
// In accessibility mode, always cross row boundaries,
// but still stop if the delimiter class changes
if (_GetDelimiterClassAt(nextPos, wordDelimiters) != initialDelimClass)
{
return nextPos;
}
}
else if (!row.WasWrapForced() || _GetDelimiterClassAt(nextPos, wordDelimiters) != initialDelimClass)
if (!row.WasWrapForced() || _GetDelimiterClassAt(nextPos, wordDelimiters) != initialDelimClass)
{
return pos;
}
@@ -1424,6 +1348,283 @@ til::point TextBuffer::_GetDelimiterClassRunEnd(til::point pos, const std::wstri
return pos;
}
// Method Description:
// - Get the til::point for the beginning of the word you are on
// Arguments:
// - target - a til::point on the word you are currently on
// - wordDelimiters - what characters are we considering for the separation of words
// - accessibilityMode - when enabled, we continue expanding left until we are at the beginning of a readable word.
// Otherwise, expand left until a character of a new delimiter class is found
// (or a row boundary is encountered)
// - limitOptional - (optional) the last possible position in the buffer that can be explored. This can be used to improve performance.
// Return Value:
// - The til::point for the first character on the "word" (inclusive)
til::point TextBuffer::GetWordStart(const til::point target, const std::wstring_view wordDelimiters, bool accessibilityMode, std::optional<til::point> limitOptional) const
{
// Consider a buffer with this text in it:
// " word other "
// In selection (accessibilityMode = false),
// a "word" is defined as the range between two delimiters
// so the words in the example include [" ", "word", " ", "other", " "]
// In accessibility (accessibilityMode = true),
// a "word" includes the delimiters after a range of readable characters
// so the words in the example include ["word ", "other "]
// NOTE: the start anchor (this one) is inclusive, whereas the end anchor (GetWordEnd) is exclusive
#pragma warning(suppress : 26496)
auto copy{ target };
const auto bufferSize{ GetSize() };
const auto limit{ limitOptional.value_or(bufferSize.EndExclusive()) };
if (target == bufferSize.Origin())
{
// can't expand left
return target;
}
else if (target == bufferSize.EndExclusive())
{
// GH#7664: Treat EndExclusive as EndInclusive so
// that it actually points to a space in the buffer
copy = bufferSize.BottomRightInclusive();
}
else if (bufferSize.CompareInBounds(target, limit, true) >= 0)
{
// if at/past the limit --> clamp to limit
copy = limitOptional.value_or(bufferSize.BottomRightInclusive());
}
if (accessibilityMode)
{
return _GetWordStartForAccessibility(copy, wordDelimiters);
}
else
{
return _GetWordStartForSelection(copy, wordDelimiters);
}
}
// Method Description:
// - Helper method for GetWordStart(). Get the til::point for the beginning of the word (accessibility definition) you are on
// Arguments:
// - target - a til::point on the word you are currently on
// - wordDelimiters - what characters are we considering for the separation of words
// Return Value:
// - The til::point for the first character on the current/previous READABLE "word" (inclusive)
til::point TextBuffer::_GetWordStartForAccessibility(const til::point target, const std::wstring_view wordDelimiters) const
{
auto result = target;
const auto bufferSize = GetSize();
// ignore left boundary. Continue until readable text found
while (_GetDelimiterClassAt(result, wordDelimiters) != DelimiterClass::RegularChar)
{
if (result == bufferSize.Origin())
{
//looped around and hit origin (no word between origin and target)
return result;
}
bufferSize.DecrementInBounds(result);
}
// make sure we expand to the left boundary or the beginning of the word
while (_GetDelimiterClassAt(result, wordDelimiters) == DelimiterClass::RegularChar)
{
if (result == bufferSize.Origin())
{
// first char in buffer is a RegularChar
// we can't move any further back
return result;
}
bufferSize.DecrementInBounds(result);
}
// move off of delimiter
bufferSize.IncrementInBounds(result);
return result;
}
// Method Description:
// - Helper method for GetWordStart(). Get the til::point for the beginning of the word (selection definition) you are on
// Arguments:
// - target - a til::point on the word you are currently on
// - wordDelimiters - what characters are we considering for the separation of words
// Return Value:
// - The til::point for the first character on the current word or delimiter run (stopped by the left margin)
til::point TextBuffer::_GetWordStartForSelection(const til::point target, const std::wstring_view wordDelimiters) const
{
auto result = target;
const auto bufferSize = GetSize();
const auto initialDelimiter = _GetDelimiterClassAt(result, wordDelimiters);
const bool isControlChar = initialDelimiter == DelimiterClass::ControlChar;
// expand left until we hit the left boundary or a different delimiter class
while (result != bufferSize.Origin() && _GetDelimiterClassAt(result, wordDelimiters) == initialDelimiter)
{
if (result.x == bufferSize.Left())
{
// Prevent wrapping to the previous line if the selection begins on whitespace
if (isControlChar)
{
break;
}
if (result.y > 0)
{
// Prevent wrapping to the previous line if it was hard-wrapped (e.g. not forced by us to wrap)
const auto& priorRow = GetRowByOffset(result.y - 1);
if (!priorRow.WasWrapForced())
{
break;
}
}
}
bufferSize.DecrementInBounds(result);
}
if (_GetDelimiterClassAt(result, wordDelimiters) != initialDelimiter)
{
// move off of delimiter
bufferSize.IncrementInBounds(result);
}
return result;
}
// Method Description:
// - Get the til::point for the beginning of the NEXT word
// Arguments:
// - target - a til::point on the word you are currently on
// - wordDelimiters - what characters are we considering for the separation of words
// - accessibilityMode - when enabled, we continue expanding right until we are at the beginning of the next READABLE word
// Otherwise, expand right until a character of a new delimiter class is found
// (or a row boundary is encountered)
// - limitOptional - (optional) the last possible position in the buffer that can be explored. This can be used to improve performance.
// Return Value:
// - The til::point for the last character on the "word" (inclusive)
til::point TextBuffer::GetWordEnd(const til::point target, const std::wstring_view wordDelimiters, bool accessibilityMode, std::optional<til::point> limitOptional) const
{
// Consider a buffer with this text in it:
// " word other "
// In selection (accessibilityMode = false),
// a "word" is defined as the range between two delimiters
// so the words in the example include [" ", "word", " ", "other", " "]
// In accessibility (accessibilityMode = true),
// a "word" includes the delimiters after a range of readable characters
// so the words in the example include ["word ", "other "]
// NOTE: the end anchor (this one) is exclusive, whereas the start anchor (GetWordStart) is inclusive
// Already at/past the limit. Can't move forward.
const auto bufferSize{ GetSize() };
const auto limit{ limitOptional.value_or(bufferSize.EndExclusive()) };
if (bufferSize.CompareInBounds(target, limit, true) >= 0)
{
return target;
}
if (accessibilityMode)
{
return _GetWordEndForAccessibility(target, wordDelimiters, limit);
}
else
{
return _GetWordEndForSelection(target, wordDelimiters);
}
}
// Method Description:
// - Helper method for GetWordEnd(). Get the til::point for the beginning of the next READABLE word
// Arguments:
// - target - a til::point on the word you are currently on
// - wordDelimiters - what characters are we considering for the separation of words
// - limit - the last "valid" position in the text buffer (to improve performance)
// Return Value:
// - The til::point for the first character of the next readable "word". If no next word, return one past the end of the buffer
til::point TextBuffer::_GetWordEndForAccessibility(const til::point target, const std::wstring_view wordDelimiters, const til::point limit) const
{
const auto bufferSize{ GetSize() };
auto result{ target };
if (bufferSize.CompareInBounds(target, limit, true) >= 0)
{
// if we're already on/past the last RegularChar,
// clamp result to that position
result = limit;
// make the result exclusive
bufferSize.IncrementInBounds(result, true);
}
else
{
while (result != limit && result != bufferSize.BottomRightInclusive() && _GetDelimiterClassAt(result, wordDelimiters) == DelimiterClass::RegularChar)
{
// Iterate through readable text
bufferSize.IncrementInBounds(result);
}
while (result != limit && result != bufferSize.BottomRightInclusive() && _GetDelimiterClassAt(result, wordDelimiters) != DelimiterClass::RegularChar)
{
// expand to the beginning of the NEXT word
bufferSize.IncrementInBounds(result);
}
// Special case: we tried to move one past the end of the buffer
// Manually increment onto the EndExclusive point.
if (result == bufferSize.BottomRightInclusive())
{
bufferSize.IncrementInBounds(result, true);
}
}
return result;
}
// Method Description:
// - Helper method for GetWordEnd(). Get the til::point for the beginning of the NEXT word
// Arguments:
// - target - a til::point on the word you are currently on
// - wordDelimiters - what characters are we considering for the separation of words
// Return Value:
// - The til::point for the last character of the current word or delimiter run (stopped by right margin)
til::point TextBuffer::_GetWordEndForSelection(const til::point target, const std::wstring_view wordDelimiters) const
{
const auto bufferSize = GetSize();
auto result = target;
const auto initialDelimiter = _GetDelimiterClassAt(result, wordDelimiters);
const bool isControlChar = initialDelimiter == DelimiterClass::ControlChar;
// expand right until we hit the right boundary as a ControlChar or a different delimiter class
while (result != bufferSize.BottomRightInclusive() && _GetDelimiterClassAt(result, wordDelimiters) == initialDelimiter)
{
if (result.x == bufferSize.RightInclusive())
{
// Prevent wrapping to the next line if the selection begins on whitespace
if (isControlChar)
{
break;
}
// Prevent wrapping to the next line if this one was hard-wrapped (e.g. not forced by us to wrap)
const auto& row = GetRowByOffset(result.y);
if (!row.WasWrapForced())
{
break;
}
}
bufferSize.IncrementInBounds(result);
}
if (_GetDelimiterClassAt(result, wordDelimiters) != initialDelimiter)
{
// move off of delimiter
bufferSize.DecrementInBounds(result);
}
return result;
}
void TextBuffer::_PruneHyperlinks()
{
// Check the old first row for hyperlink references
@@ -1470,6 +1671,57 @@ void TextBuffer::_PruneHyperlinks()
}
}
// Method Description:
// - Update pos to be the position of the first character of the next word. This is used for accessibility
// Arguments:
// - pos - a til::point on the word you are currently on
// - wordDelimiters - what characters are we considering for the separation of words
// - limitOptional - (optional) the last possible position in the buffer that can be explored. This can be used to improve performance.
// Return Value:
// - true, if successfully updated pos. False, if we are unable to move (usually due to a buffer boundary)
// - pos - The til::point for the first character on the "word" (inclusive)
bool TextBuffer::MoveToNextWord(til::point& pos, const std::wstring_view wordDelimiters, std::optional<til::point> limitOptional) const
{
// move to the beginning of the next word
// NOTE: _GetWordEnd...() returns the exclusive position of the "end of the word"
// This is also the inclusive start of the next word.
const auto bufferSize{ GetSize() };
const auto limit{ limitOptional.value_or(bufferSize.EndExclusive()) };
const auto copy{ _GetWordEndForAccessibility(pos, wordDelimiters, limit) };
if (bufferSize.CompareInBounds(copy, limit, true) >= 0)
{
return false;
}
pos = copy;
return true;
}
// Method Description:
// - Update pos to be the position of the first character of the previous word. This is used for accessibility
// Arguments:
// - pos - a til::point on the word you are currently on
// - wordDelimiters - what characters are we considering for the separation of words
// Return Value:
// - true, if successfully updated pos. False, if we are unable to move (usually due to a buffer boundary)
// - pos - The til::point for the first character on the "word" (inclusive)
bool TextBuffer::MoveToPreviousWord(til::point& pos, std::wstring_view wordDelimiters) const
{
// move to the beginning of the current word
auto copy{ GetWordStart(pos, wordDelimiters, true) };
if (!GetSize().DecrementInBounds(copy, true))
{
// can't move behind current word
return false;
}
// move to the beginning of the previous word
pos = GetWordStart(copy, wordDelimiters, true);
return true;
}
// Method Description:
// - Update pos to be the beginning of the current glyph/character. This is used for accessibility
// Arguments:
@@ -3527,34 +3779,3 @@ void TextBuffer::ManuallyMarkRowAsPrompt(til::CoordType y)
attr.SetMarkAttributes(MarkKind::Prompt);
}
}
// This is an optimization used by the renderer to avoid scheduling a timer if not necessary;
// unlike the renderer, we know the committed range of our own buffer.
bool TextBuffer::ContainsBlinkAttributeInRegion(const Microsoft::Console::Types::Viewport& region) const
{
const auto top = region.Top();
auto bottom = std::min(region.BottomInclusive(), _estimateOffsetOfLastCommittedRow());
for (auto row = top; row < bottom; ++row)
{
const auto& r = GetRowByOffset(row);
for (const auto& attr : r.Attributes())
{
if (attr.IsBlinking())
{
return true;
}
}
}
return false;
}
bool TextBuffer::IsGlyphDoubleWidthAt(const til::point at) const
{
if (!_isRowCommitted(at.y)) [[unlikely]]
{
return false;
}
return _getRow(at.y).DbcsAttrAt(at.x) != DbcsAttribute::Single;
}

View File

@@ -172,10 +172,15 @@ public:
void TriggerNewTextNotification(const std::wstring_view newText);
void TriggerSelection();
til::point GetWordStart(til::point pos, const std::wstring_view wordDelimiters, bool includeWhitespace, std::optional<til::point> limitOptional = std::nullopt) const;
til::point GetWordEnd(til::point pos, const std::wstring_view wordDelimiters, bool includeWhitespace, std::optional<til::point> limitOptional = std::nullopt) const;
til::point GetWordStart(const til::point target, const std::wstring_view wordDelimiters, bool accessibilityMode = false, std::optional<til::point> limitOptional = std::nullopt) const;
til::point GetWordEnd(const til::point target, const std::wstring_view wordDelimiters, bool accessibilityMode = false, std::optional<til::point> limitOptional = std::nullopt) const;
til::point GetWordStart2(til::point pos, const std::wstring_view wordDelimiters, bool includeWhitespace, std::optional<til::point> limitOptional = std::nullopt) const;
til::point GetWordEnd2(til::point pos, const std::wstring_view wordDelimiters, bool includeWhitespace, std::optional<til::point> limitOptional = std::nullopt) const;
bool IsWordBoundary(const til::point pos, const std::wstring_view wordDelimiters) const;
bool MoveToNextWord(til::point& pos, const std::wstring_view wordDelimiters, std::optional<til::point> limitOptional = std::nullopt) const;
bool MoveToPreviousWord(til::point& pos, const std::wstring_view wordDelimiters) const;
til::point GetGlyphStart(const til::point pos, std::optional<til::point> limitOptional = std::nullopt) const;
til::point GetGlyphEnd(const til::point pos, bool accessibilityMode = false, std::optional<til::point> limitOptional = std::nullopt) const;
@@ -310,9 +315,6 @@ public:
void SetScrollbarData(ScrollbarData mark, til::CoordType y);
void ManuallyMarkRowAsPrompt(til::CoordType y);
bool ContainsBlinkAttributeInRegion(const Microsoft::Console::Types::Viewport& region) const;
bool IsGlyphDoubleWidthAt(const til::point at) const;
private:
void _reserve(til::size screenBufferSize, const TextAttribute& defaultAttributes);
void _commit(const std::byte* row);
@@ -322,13 +324,16 @@ private:
ROW& _getRowByOffsetDirect(size_t offset);
ROW& _getRow(til::CoordType y) const;
til::CoordType _estimateOffsetOfLastCommittedRow() const noexcept;
bool _isRowCommitted(til::CoordType y) const noexcept;
void _SetFirstRowIndex(const til::CoordType FirstRowIndex) noexcept;
void _ExpandTextRow(til::inclusive_rect& selectionRow) const;
DelimiterClass _GetDelimiterClassAt(const til::point pos, const std::wstring_view wordDelimiters) const;
til::point _GetDelimiterClassRunStart(til::point pos, const std::wstring_view wordDelimiters, const bool accessibilityMode = false) const;
til::point _GetDelimiterClassRunEnd(til::point pos, const std::wstring_view wordDelimiters, const bool accessibilityMode = false) const;
til::point _GetDelimiterClassRunStart(til::point pos, const std::wstring_view wordDelimiters) const;
til::point _GetDelimiterClassRunEnd(til::point pos, const std::wstring_view wordDelimiters) const;
til::point _GetWordStartForAccessibility(const til::point target, const std::wstring_view wordDelimiters) const;
til::point _GetWordStartForSelection(const til::point target, const std::wstring_view wordDelimiters) const;
til::point _GetWordEndForAccessibility(const til::point target, const std::wstring_view wordDelimiters, const til::point limit) const;
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 bool clipAtCursor = false) const;

View File

@@ -34,16 +34,6 @@ class UTextAdapterTests
{
TEST_CLASS(UTextAdapterTests);
TEST_CLASS_SETUP(ClassSetup)
{
wil::unique_hmodule icu{ LoadLibraryExW(L"icu.dll", nullptr, LOAD_LIBRARY_SEARCH_SYSTEM32) };
if (!icu)
{
WEX::Logging::Log::Result(WEX::Logging::TestResults::Skipped, L"ICU is not present");
}
return true;
}
TEST_METHOD(Unicode)
{
DummyRenderer renderer;

View File

@@ -26,9 +26,6 @@ TARGETLIBS = \
$(CONSOLE_OBJ_PATH)\types\lib\$(O)\ConTypes.lib \
$(TARGETLIBS) \
DELAYLOAD = \
icu.dll \
# -------------------------------------
# Localization
# -------------------------------------

View File

@@ -192,7 +192,7 @@
ResourceKey="TabViewBackground" />
<SolidColorBrush x:Key="SettingsUiTabBrush"
Color="#282828" />
Color="#0c0c0c" />
<SolidColorBrush x:Key="BroadcastPaneBorderColor"
Color="{StaticResource SystemAccentColorDark2}" />
@@ -211,7 +211,7 @@
ResourceKey="TabViewBackground" />
<SolidColorBrush x:Key="SettingsUiTabBrush"
Color="#F9F9F9" />
Color="#ffffff" />
<SolidColorBrush x:Key="BroadcastPaneBorderColor"
Color="{StaticResource SystemAccentColorLight2}" />
@@ -234,7 +234,7 @@
ResourceKey="SystemColorButtonFaceColorBrush" />
<StaticResource x:Key="SettingsUiTabBrush"
ResourceKey="SystemColorWindowBrush" />
ResourceKey="SystemControlBackgroundBaseLowBrush" />
<SolidColorBrush x:Key="BroadcastPaneBorderColor"
Color="{StaticResource SystemColorHighlightColor}" />

View File

@@ -169,8 +169,6 @@ namespace winrt::Microsoft::Terminal::Control::implementation
void ControlInteractivity::GotFocus()
{
_focused = true;
if (_uiaEngine.get())
{
THROW_IF_FAILED(_uiaEngine->Enable());
@@ -183,8 +181,6 @@ namespace winrt::Microsoft::Terminal::Control::implementation
void ControlInteractivity::LostFocus()
{
_focused = false;
if (_uiaEngine.get())
{
THROW_IF_FAILED(_uiaEngine->Disable());
@@ -252,8 +248,7 @@ namespace winrt::Microsoft::Terminal::Control::implementation
PasteFromClipboard.raise(*this, std::move(args));
}
void ControlInteractivity::PointerPressed(const uint32_t /*pointerId*/,
Control::MouseButtonState buttonState,
void ControlInteractivity::PointerPressed(Control::MouseButtonState buttonState,
const unsigned int pointerUpdateKind,
const uint64_t timestamp,
const ::Microsoft::Terminal::Core::ControlKeyStates modifiers,
@@ -266,10 +261,6 @@ namespace winrt::Microsoft::Terminal::Control::implementation
const auto shiftEnabled = modifiers.IsShiftPressed();
const auto ctrlEnabled = modifiers.IsCtrlPressed();
// Mark that this pointer event actually started within our bounds.
// We'll need this later, for PointerMoved events.
_pointerPressedInBounds = true;
// GH#9396: we prioritize hyper-link over VT mouse events
auto hyperlink = _core->GetHyperlink(terminalPosition.to_core_point());
if (WI_IsFlagSet(buttonState, MouseButtonState::IsLeftButtonDown) &&
@@ -364,23 +355,24 @@ namespace winrt::Microsoft::Terminal::Control::implementation
}
}
void ControlInteractivity::TouchPressed(const Core::Point contactPoint)
void ControlInteractivity::TouchPressed(const winrt::Windows::Foundation::Point contactPoint)
{
_touchAnchor = contactPoint;
}
bool ControlInteractivity::PointerMoved(const uint32_t /*pointerId*/,
Control::MouseButtonState buttonState,
bool ControlInteractivity::PointerMoved(Control::MouseButtonState buttonState,
const unsigned int pointerUpdateKind,
const ::Microsoft::Terminal::Core::ControlKeyStates modifiers,
const Core::Point pixelPosition)
const bool focused,
const Core::Point pixelPosition,
const bool pointerPressedInBounds)
{
const auto terminalPosition = _getTerminalPosition(til::point{ pixelPosition }, false);
// Returning true from this function indicates that the caller should do no further processing of this movement.
bool handledCompletely = false;
// Short-circuit isReadOnly check to avoid warning dialog
if (_focused && !_core->IsInReadOnlyMode() && _canSendVTMouseInput(modifiers))
if (focused && !_core->IsInReadOnlyMode() && _canSendVTMouseInput(modifiers))
{
_sendMouseEventHelper(terminalPosition, pointerUpdateKind, modifiers, 0, buttonState);
handledCompletely = true;
@@ -389,7 +381,7 @@ namespace winrt::Microsoft::Terminal::Control::implementation
// actually start _in_ the control bounds. Case in point - someone drags
// a file into the bounds of the control. That shouldn't send the
// selection into space.
else if (_focused && _pointerPressedInBounds && WI_IsFlagSet(buttonState, MouseButtonState::IsLeftButtonDown))
else if (focused && pointerPressedInBounds && WI_IsFlagSet(buttonState, MouseButtonState::IsLeftButtonDown))
{
if (_singleClickTouchdownPos)
{
@@ -435,9 +427,10 @@ namespace winrt::Microsoft::Terminal::Control::implementation
return handledCompletely;
}
void ControlInteractivity::TouchMoved(const Core::Point newTouchPoint)
void ControlInteractivity::TouchMoved(const winrt::Windows::Foundation::Point newTouchPoint,
const bool focused)
{
if (_focused &&
if (focused &&
_touchAnchor)
{
const auto anchor = _touchAnchor.value();
@@ -471,14 +464,11 @@ namespace winrt::Microsoft::Terminal::Control::implementation
}
}
void ControlInteractivity::PointerReleased(const uint32_t /*pointerId*/,
Control::MouseButtonState buttonState,
void ControlInteractivity::PointerReleased(Control::MouseButtonState buttonState,
const unsigned int pointerUpdateKind,
const ::Microsoft::Terminal::Core::ControlKeyStates modifiers,
const Core::Point pixelPosition)
{
_pointerPressedInBounds = false;
const auto terminalPosition = _getTerminalPosition(til::point{ pixelPosition }, false);
// Short-circuit isReadOnly check to avoid warning dialog
if (!_core->IsInReadOnlyMode() && _canSendVTMouseInput(modifiers))

View File

@@ -51,23 +51,23 @@ namespace winrt::Microsoft::Terminal::Control::implementation
::Microsoft::Console::Render::IRenderData* GetRenderData() const;
#pragma region Input Methods
void PointerPressed(const uint32_t pointerId,
Control::MouseButtonState buttonState,
void PointerPressed(Control::MouseButtonState buttonState,
const unsigned int pointerUpdateKind,
const uint64_t timestamp,
const ::Microsoft::Terminal::Core::ControlKeyStates modifiers,
const Core::Point pixelPosition);
void TouchPressed(const Core::Point contactPoint);
void TouchPressed(const winrt::Windows::Foundation::Point contactPoint);
bool PointerMoved(const uint32_t pointerId,
Control::MouseButtonState buttonState,
bool PointerMoved(Control::MouseButtonState buttonState,
const unsigned int pointerUpdateKind,
const ::Microsoft::Terminal::Core::ControlKeyStates modifiers,
const Core::Point pixelPosition);
void TouchMoved(const Core::Point newTouchPoint);
const bool focused,
const Core::Point pixelPosition,
const bool pointerPressedInBounds);
void TouchMoved(const winrt::Windows::Foundation::Point newTouchPoint,
const bool focused);
void PointerReleased(const uint32_t pointerId,
Control::MouseButtonState buttonState,
void PointerReleased(Control::MouseButtonState buttonState,
const unsigned int pointerUpdateKind,
const ::Microsoft::Terminal::Core::ControlKeyStates modifiers,
const Core::Point pixelPosition);
@@ -115,7 +115,7 @@ namespace winrt::Microsoft::Terminal::Control::implementation
// If this is set, then we assume we are in the middle of panning the
// viewport via touch input.
std::optional<Core::Point> _touchAnchor;
std::optional<winrt::Windows::Foundation::Point> _touchAnchor;
using Timestamp = uint64_t;
@@ -142,9 +142,6 @@ namespace winrt::Microsoft::Terminal::Control::implementation
uint64_t _id;
static std::atomic<uint64_t> _nextId;
bool _focused{ false };
bool _pointerPressedInBounds{ false };
unsigned int _numberOfClicks(Core::Point clickPos, Timestamp clickTime);
void _updateSystemParameterSettings() noexcept;

View File

@@ -36,24 +36,24 @@ namespace Microsoft.Terminal.Control
void RequestPasteTextFromClipboard();
void SetEndSelectionPoint(Microsoft.Terminal.Core.Point point);
void PointerPressed(UInt32 pointerId,
MouseButtonState buttonState,
void PointerPressed(MouseButtonState buttonState,
UInt32 pointerUpdateKind,
UInt64 timestamp,
Microsoft.Terminal.Core.ControlKeyStates modifiers,
Microsoft.Terminal.Core.Point pixelPosition);
void TouchPressed(Microsoft.Terminal.Core.Point contactPoint);
void TouchPressed(Windows.Foundation.Point contactPoint);
Boolean PointerMoved(UInt32 pointerId,
MouseButtonState buttonState,
Boolean PointerMoved(MouseButtonState buttonState,
UInt32 pointerUpdateKind,
Microsoft.Terminal.Core.ControlKeyStates modifiers,
Microsoft.Terminal.Core.Point pixelPosition);
Boolean focused,
Microsoft.Terminal.Core.Point pixelPosition,
Boolean pointerPressedInBounds);
void TouchMoved(Microsoft.Terminal.Core.Point newTouchPoint);
void TouchMoved(Windows.Foundation.Point newTouchPoint,
Boolean focused);
void PointerReleased(UInt32 pointerId,
MouseButtonState buttonState,
void PointerReleased(MouseButtonState buttonState,
UInt32 pointerUpdateKind,
Microsoft.Terminal.Core.ControlKeyStates modifiers,
Microsoft.Terminal.Core.Point pixelPosition);

View File

@@ -76,7 +76,6 @@ namespace Microsoft.Terminal.Control
Boolean RepositionCursorWithMouse { get; };
PathTranslationStyle PathTranslationStyle { get; };
String DragDropDelimiter { get; };
// NOTE! When adding something here, make sure to update ControlProperties.h too!
};

View File

@@ -1990,14 +1990,12 @@ namespace winrt::Microsoft::Terminal::Control::implementation
// NB: I don't think this is correct because the touch should be in the center of the rect.
// I suspect the point.Position() would be correct.
const auto contactRect = point.Properties().ContactRect();
til::point newTouchPoint{ til::math::rounding, contactRect.X, contactRect.Y };
_interactivity.TouchPressed(newTouchPoint.to_core_point());
_interactivity.TouchPressed({ contactRect.X, contactRect.Y });
}
else
{
const auto cursorPosition = point.Position();
_interactivity.PointerPressed(point.PointerId(),
TermControl::GetPressedMouseButtons(point),
_interactivity.PointerPressed(TermControl::GetPressedMouseButtons(point),
TermControl::GetPointerUpdateKind(point),
point.Timestamp(),
ControlKeyStates{ args.KeyModifiers() },
@@ -2036,11 +2034,12 @@ namespace winrt::Microsoft::Terminal::Control::implementation
if (type == Windows::Devices::Input::PointerDeviceType::Mouse ||
type == Windows::Devices::Input::PointerDeviceType::Pen)
{
auto suppressFurtherHandling = _interactivity.PointerMoved(point.PointerId(),
TermControl::GetPressedMouseButtons(point),
auto suppressFurtherHandling = _interactivity.PointerMoved(TermControl::GetPressedMouseButtons(point),
TermControl::GetPointerUpdateKind(point),
ControlKeyStates(args.KeyModifiers()),
pixelPosition);
_focused,
pixelPosition,
_pointerPressedInBounds);
// GH#9109 - Only start an auto-scroll when the drag actually
// started within our bounds. Otherwise, someone could start a drag
@@ -2079,9 +2078,7 @@ namespace winrt::Microsoft::Terminal::Control::implementation
else if (type == Windows::Devices::Input::PointerDeviceType::Touch)
{
const auto contactRect = point.Properties().ContactRect();
til::point newTouchPoint{ til::math::rounding, contactRect.X, contactRect.Y };
_interactivity.TouchMoved(newTouchPoint.to_core_point());
_interactivity.TouchMoved({ contactRect.X, contactRect.Y }, _focused);
}
args.Handled(true);
@@ -2114,8 +2111,7 @@ namespace winrt::Microsoft::Terminal::Control::implementation
if (type == Windows::Devices::Input::PointerDeviceType::Mouse ||
type == Windows::Devices::Input::PointerDeviceType::Pen)
{
_interactivity.PointerReleased(point.PointerId(),
TermControl::GetPressedMouseButtons(point),
_interactivity.PointerReleased(TermControl::GetPressedMouseButtons(point),
TermControl::GetPointerUpdateKind(point),
ControlKeyStates(args.KeyModifiers()),
pixelPosition);
@@ -3079,7 +3075,7 @@ namespace winrt::Microsoft::Terminal::Control::implementation
// the full path of the file to our terminal connection. Like conhost, if
// the path contains a space, we'll wrap the path in quotes.
// - Unlike conhost, if multiple files are dropped onto the terminal, we'll
// write all the paths to the terminal, separated by the configured delimiter.
// write all the paths to the terminal, separated by spaces.
// Arguments:
// - e: The DragEventArgs from the Drop event
// Return Value:
@@ -3200,13 +3196,12 @@ namespace winrt::Microsoft::Terminal::Control::implementation
}
std::wstring allPathsString;
const auto delimiter{ _core.Settings().DragDropDelimiter() };
for (auto& fullPath : fullPaths)
{
// Join the paths with the delimiter
// Join the paths with spaces
if (!allPathsString.empty())
{
allPathsString += delimiter;
allPathsString += L" ";
}
const auto translationStyle{ _core.Settings().PathTranslationStyle() };

View File

@@ -313,7 +313,7 @@ std::pair<til::point, til::point> Terminal::_ExpandSelectionAnchors(std::pair<ti
break;
case SelectionExpansion::Word:
{
start = buffer.GetWordStart(start, _wordDelimiters, false);
start = buffer.GetWordStart2(start, _wordDelimiters, false);
// GH#5099: We round to the nearest cell boundary,
// so we would normally prematurely expand to the next word
@@ -325,7 +325,7 @@ std::pair<til::point, til::point> Terminal::_ExpandSelectionAnchors(std::pair<ti
{
bufferSize.DecrementInExclusiveBounds(end);
}
end = buffer.GetWordEnd(end, _wordDelimiters, false);
end = buffer.GetWordEnd2(end, _wordDelimiters, false);
break;
}
case SelectionExpansion::Char:
@@ -435,9 +435,9 @@ void Terminal::ExpandSelectionToWord()
const auto& buffer = _activeBuffer();
auto selection{ _selection.write() };
wil::hide_name _selection;
selection->start = buffer.GetWordStart(selection->start, _wordDelimiters, false);
selection->start = buffer.GetWordStart2(selection->start, _wordDelimiters, false);
selection->pivot = selection->start;
selection->end = buffer.GetWordEnd(selection->end, _wordDelimiters, false);
selection->end = buffer.GetWordEnd2(selection->end, _wordDelimiters, false);
// if we're targeting both endpoints, instead just target "end"
if (WI_IsFlagSet(_selectionEndpoint, SelectionEndpoint::Start) && WI_IsFlagSet(_selectionEndpoint, SelectionEndpoint::End))
@@ -826,13 +826,13 @@ void Terminal::_MoveByWord(SelectionDirection direction, til::point& pos)
case SelectionDirection::Left:
{
auto nextPos = pos;
nextPos = buffer.GetWordStart(nextPos, _wordDelimiters, true);
nextPos = buffer.GetWordStart2(nextPos, _wordDelimiters, true);
if (nextPos == pos)
{
// didn't move because we're already at the beginning of a word,
// so move to the beginning of the previous word
buffer.GetSize().DecrementInExclusiveBounds(nextPos);
nextPos = buffer.GetWordStart(nextPos, _wordDelimiters, true);
nextPos = buffer.GetWordStart2(nextPos, _wordDelimiters, true);
}
pos = nextPos;
break;
@@ -841,24 +841,24 @@ void Terminal::_MoveByWord(SelectionDirection direction, til::point& pos)
{
const auto mutableViewportEndExclusive = _GetMutableViewport().BottomInclusiveRightExclusive();
auto nextPos = pos;
nextPos = buffer.GetWordEnd(nextPos, _wordDelimiters, true, mutableViewportEndExclusive);
nextPos = buffer.GetWordEnd2(nextPos, _wordDelimiters, true, mutableViewportEndExclusive);
if (nextPos == pos)
{
// didn't move because we're already at the end of a word,
// so move to the end of the next word
buffer.GetSize().IncrementInExclusiveBounds(nextPos);
nextPos = buffer.GetWordEnd(nextPos, _wordDelimiters, true, mutableViewportEndExclusive);
nextPos = buffer.GetWordEnd2(nextPos, _wordDelimiters, true, mutableViewportEndExclusive);
}
pos = nextPos;
break;
}
case SelectionDirection::Up:
_MoveByChar(direction, pos);
pos = buffer.GetWordStart(pos, _wordDelimiters, true);
pos = buffer.GetWordStart2(pos, _wordDelimiters, true);
break;
case SelectionDirection::Down:
_MoveByChar(direction, pos);
pos = buffer.GetWordEnd(pos, _wordDelimiters, true);
pos = buffer.GetWordEnd2(pos, _wordDelimiters, true);
break;
}
}

View File

@@ -353,7 +353,6 @@ namespace winrt::Microsoft::Terminal::Settings
_AllowVtChecksumReport = profile.AllowVtChecksumReport();
_AllowVtClipboardWrite = profile.AllowVtClipboardWrite();
_PathTranslationStyle = profile.PathTranslationStyle();
_DragDropDelimiter = profile.DragDropDelimiter();
}
// Method Description:

View File

@@ -145,7 +145,6 @@ namespace winrt::Microsoft::Terminal::Settings::Editor::implementation
OBSERVABLE_PROJECTED_SETTING(_profile, AnswerbackMessage);
OBSERVABLE_PROJECTED_SETTING(_profile, RainbowSuggestions);
OBSERVABLE_PROJECTED_SETTING(_profile, PathTranslationStyle);
OBSERVABLE_PROJECTED_SETTING(_profile, DragDropDelimiter);
WINRT_PROPERTY(bool, IsBaseLayer, false);
WINRT_PROPERTY(bool, FocusDeleteButton, false);

View File

@@ -139,7 +139,6 @@ namespace Microsoft.Terminal.Settings.Editor
OBSERVABLE_PROJECTED_PROFILE_SETTING(String, AnswerbackMessage);
OBSERVABLE_PROJECTED_PROFILE_SETTING(Boolean, RainbowSuggestions);
OBSERVABLE_PROJECTED_PROFILE_SETTING(Microsoft.Terminal.Control.PathTranslationStyle, PathTranslationStyle);
OBSERVABLE_PROJECTED_PROFILE_SETTING(String, DragDropDelimiter);
OBSERVABLE_PROJECTED_PROFILE_SETTING(Boolean, AllowVtClipboardWrite);
}
}

View File

@@ -272,16 +272,6 @@
Style="{StaticResource ComboBoxSettingStyle}" />
</local:SettingContainer>
<!-- Drag Drop Delimiter -->
<local:SettingContainer x:Name="DragDropDelimiter"
x:Uid="Profile_DragDropDelimiter"
ClearSettingValue="{x:Bind Profile.ClearDragDropDelimiter}"
HasSettingValue="{x:Bind Profile.HasDragDropDelimiter, Mode=OneWay}"
SettingOverrideSource="{x:Bind Profile.DragDropDelimiterOverrideSource, Mode=OneWay}">
<TextBox Style="{StaticResource TextBoxSettingStyle}"
Text="{x:Bind Profile.DragDropDelimiter, Mode=TwoWay}" />
</local:SettingContainer>
</StackPanel>
</Grid>
</Page>

View File

@@ -2748,12 +2748,4 @@
<value>Type to filter icons</value>
<comment>Placeholder text for a text box to filter and select an icon.</comment>
</data>
<data name="Profile_DragDropDelimiter.Header" xml:space="preserve">
<value>Drag and drop delimiter</value>
<comment>Header for a control to set the delimiter used when dragging multiple files into the terminal.</comment>
</data>
<data name="Profile_DragDropDelimiter.HelpText" xml:space="preserve">
<value>This text will be inserted between the paths of multiple files dropped into the terminal.</value>
<comment>A description for what the "drag drop delimiter" setting does.</comment>
</data>
</root>
</root>

View File

@@ -108,7 +108,6 @@ Author(s):
X(bool, AllowVtChecksumReport, "compatibility.allowDECRQCRA", false) \
X(bool, AllowVtClipboardWrite, "compatibility.allowOSC52", true) \
X(bool, AllowKeypadMode, "compatibility.allowDECNKM", false) \
X(hstring, DragDropDelimiter, "dragDropDelimiter", L" ") \
X(Microsoft::Terminal::Control::PathTranslationStyle, PathTranslationStyle, "pathTranslationStyle", Microsoft::Terminal::Control::PathTranslationStyle::None)
// Intentionally omitted Profile settings:

View File

@@ -94,6 +94,5 @@ namespace Microsoft.Terminal.Settings.Model
INHERITABLE_PROFILE_SETTING(Boolean, AllowVtClipboardWrite);
INHERITABLE_PROFILE_SETTING(Microsoft.Terminal.Control.PathTranslationStyle, PathTranslationStyle);
INHERITABLE_PROFILE_SETTING(String, DragDropDelimiter);
}
}

View File

@@ -313,13 +313,10 @@ namespace ControlUnitTests
const til::size fontSize{ 9, 21 };
interactivity->GotFocus();
Log::Comment(L"Click on the terminal");
const til::point terminalPosition0{ 0, 0 };
const auto cursorPosition0 = terminalPosition0 * fontSize;
interactivity->PointerPressed(0,
leftMouseDown,
interactivity->PointerPressed(leftMouseDown,
WM_LBUTTONDOWN, //pointerUpdateKind
0, // timestamp
modifiers,
@@ -332,28 +329,29 @@ namespace ControlUnitTests
// move not quite a whole cell, but enough to start a selection
const til::point terminalPosition1{ 0, 0 };
const til::point cursorPosition1{ 6, 0 };
interactivity->PointerMoved(0,
leftMouseDown,
interactivity->PointerMoved(leftMouseDown,
WM_LBUTTONDOWN, //pointerUpdateKind
modifiers,
cursorPosition1.to_core_point());
true, // focused,
cursorPosition1.to_core_point(),
true);
Log::Comment(L"Verify that there's one selection");
VERIFY_IS_TRUE(core->HasSelection());
Log::Comment(L"Drag the mouse down a whole row");
const til::point terminalPosition2{ 1, 1 };
const auto cursorPosition2 = terminalPosition2 * fontSize;
interactivity->PointerMoved(0,
leftMouseDown,
interactivity->PointerMoved(leftMouseDown,
WM_LBUTTONDOWN, //pointerUpdateKind
modifiers,
cursorPosition2.to_core_point());
true, // focused,
cursorPosition2.to_core_point(),
true);
Log::Comment(L"Verify that there's now two selections (one on each row)");
VERIFY_IS_TRUE(core->HasSelection());
Log::Comment(L"Release the mouse");
interactivity->PointerReleased(0,
noMouseDown,
interactivity->PointerReleased(noMouseDown,
WM_LBUTTONUP, //pointerUpdateKind
modifiers,
cursorPosition2.to_core_point());
@@ -363,8 +361,7 @@ namespace ControlUnitTests
Log::Comment(L"click outside the current selection");
const til::point terminalPosition3{ 2, 2 };
const auto cursorPosition3 = terminalPosition3 * fontSize;
interactivity->PointerPressed(0,
leftMouseDown,
interactivity->PointerPressed(leftMouseDown,
WM_LBUTTONDOWN, //pointerUpdateKind
0, // timestamp
modifiers,
@@ -375,11 +372,12 @@ namespace ControlUnitTests
Log::Comment(L"Drag the mouse");
const til::point terminalPosition4{ 3, 2 };
const auto cursorPosition4 = terminalPosition4 * fontSize;
interactivity->PointerMoved(0,
leftMouseDown,
interactivity->PointerMoved(leftMouseDown,
WM_LBUTTONDOWN, //pointerUpdateKind
modifiers,
cursorPosition4.to_core_point());
true, // focused,
cursorPosition4.to_core_point(),
true);
Log::Comment(L"Verify that there's now one selection");
VERIFY_IS_TRUE(core->HasSelection());
}
@@ -410,17 +408,10 @@ namespace ControlUnitTests
const til::size fontSize{ 9, 21 };
interactivity->GotFocus();
// This test is sensitive to the number of rows scrolled per scroll wheel,
// which is reloaded from the system parameters when focus is received.
// Reset it.
interactivity->_rowsToScroll = 1;
Log::Comment(L"Click on the terminal");
const til::point terminalPosition0{ 5, 5 };
const auto cursorPosition0{ terminalPosition0 * fontSize };
interactivity->PointerPressed(0,
leftMouseDown,
interactivity->PointerPressed(leftMouseDown,
WM_LBUTTONDOWN, //pointerUpdateKind
0, // timestamp
modifiers,
@@ -435,11 +426,12 @@ namespace ControlUnitTests
Log::Comment(L"Drag the mouse just a little");
// move not quite a whole cell, but enough to start a selection
const auto cursorPosition1{ cursorPosition0 + til::point{ 6, 0 } };
interactivity->PointerMoved(0,
leftMouseDown,
interactivity->PointerMoved(leftMouseDown,
WM_LBUTTONDOWN, //pointerUpdateKind
modifiers,
cursorPosition1.to_core_point());
true, // focused,
cursorPosition1.to_core_point(),
true);
Log::Comment(L"Verify that there's one selection");
VERIFY_IS_TRUE(core->HasSelection());
@@ -567,12 +559,9 @@ namespace ControlUnitTests
const til::size fontSize{ 9, 21 };
interactivity->GotFocus();
Log::Comment(L"Click on the terminal");
const til::point cursorPosition0{ 6, 0 };
interactivity->PointerPressed(0,
leftMouseDown,
interactivity->PointerPressed(leftMouseDown,
WM_LBUTTONDOWN, //pointerUpdateKind
0, // timestamp
modifiers,
@@ -586,11 +575,12 @@ namespace ControlUnitTests
Log::Comment(L"Drag the mouse a lot. This simulates dragging the mouse real fast.");
const til::point cursorPosition1{ 6 + fontSize.width * 2, 0 };
interactivity->PointerMoved(0,
leftMouseDown,
interactivity->PointerMoved(leftMouseDown,
WM_LBUTTONDOWN, //pointerUpdateKind
modifiers,
cursorPosition1.to_core_point());
true, // focused,
cursorPosition1.to_core_point(),
true);
Log::Comment(L"Verify that there's one selection");
VERIFY_IS_TRUE(core->HasSelection());
@@ -612,13 +602,10 @@ namespace ControlUnitTests
const auto leftMouseDown{ Control::MouseButtonState::IsLeftButtonDown };
const Control::MouseButtonState noMouseDown{};
interactivity->GotFocus();
const til::size fontSize{ 9, 21 };
Log::Comment(L"Click on the terminal");
const til::point cursorPosition0{ 6, 0 };
interactivity->PointerPressed(0,
leftMouseDown,
interactivity->PointerPressed(leftMouseDown,
WM_LBUTTONDOWN, //pointerUpdateKind
0, // timestamp
modifiers,
@@ -632,11 +619,12 @@ namespace ControlUnitTests
Log::Comment(L"Drag the mouse a lot. This simulates dragging the mouse real fast.");
const til::point cursorPosition1{ 6 + fontSize.width * 2, 0 };
interactivity->PointerMoved(0,
leftMouseDown,
interactivity->PointerMoved(leftMouseDown,
WM_LBUTTONDOWN, //pointerUpdateKind
modifiers,
cursorPosition1.to_core_point());
true, // focused,
cursorPosition1.to_core_point(),
true);
Log::Comment(L"Verify that there's one selection");
VERIFY_IS_TRUE(core->HasSelection());
@@ -646,8 +634,7 @@ namespace ControlUnitTests
til::point expectedEnd{ 3, 0 }; // add 1 to x-coordinate because end is exclusive
VERIFY_ARE_EQUAL(expectedEnd, core->_terminal->GetSelectionEnd());
interactivity->PointerReleased(0,
noMouseDown,
interactivity->PointerReleased(noMouseDown,
WM_LBUTTONUP,
modifiers,
cursorPosition1.to_core_point());
@@ -657,11 +644,12 @@ namespace ControlUnitTests
Log::Comment(L"Simulate dragging the mouse into the control, without first clicking into the control");
const til::point cursorPosition2{ fontSize.width * 10, 0 };
interactivity->PointerMoved(0,
leftMouseDown,
interactivity->PointerMoved(leftMouseDown,
WM_LBUTTONDOWN, //pointerUpdateKind
modifiers,
cursorPosition2.to_core_point());
true, // focused,
cursorPosition2.to_core_point(),
false);
Log::Comment(L"The selection should be unchanged.");
VERIFY_ARE_EQUAL(expectedAnchor, core->_terminal->GetSelectionAnchor());
@@ -688,12 +676,6 @@ namespace ControlUnitTests
auto expectedViewHeight = 20;
auto expectedBufferHeight = 20;
interactivity->GotFocus();
// This test is sensitive to the number of rows scrolled per scroll wheel,
// which is reloaded from the system parameters when focus is received.
// Reset it.
interactivity->_rowsToScroll = 1;
auto scrollChangedHandler = [&](auto&&, const Control::ScrollPositionChangedArgs& args) mutable {
VERIFY_ARE_EQUAL(expectedTop, args.ViewTop());
VERIFY_ARE_EQUAL(expectedViewHeight, args.ViewHeight());
@@ -740,8 +722,7 @@ namespace ControlUnitTests
Log::Comment(L"Click on the terminal");
const til::point terminalPosition0{ 4, 4 };
const auto cursorPosition0 = terminalPosition0 * fontSize;
interactivity->PointerPressed(0,
leftMouseDown,
interactivity->PointerPressed(leftMouseDown,
WM_LBUTTONDOWN, //pointerUpdateKind
0, // timestamp
modifiers,
@@ -754,11 +735,12 @@ namespace ControlUnitTests
// move the mouse as if to make a selection
const til::point terminalPosition1{ 10, 4 };
const auto cursorPosition1 = terminalPosition1 * fontSize;
interactivity->PointerMoved(0,
leftMouseDown,
interactivity->PointerMoved(leftMouseDown,
WM_LBUTTONDOWN, //pointerUpdateKind
modifiers,
cursorPosition1.to_core_point());
true, // focused,
cursorPosition1.to_core_point(),
true);
Log::Comment(L"Verify that there's still no selection");
VERIFY_IS_FALSE(core->HasSelection());
}
@@ -788,13 +770,10 @@ namespace ControlUnitTests
const til::size fontSize{ 9, 21 };
interactivity->GotFocus();
Log::Comment(L"Click on the terminal");
const til::point terminalPosition0{ 5, 5 };
const auto cursorPosition0{ terminalPosition0 * fontSize };
interactivity->PointerPressed(0,
leftMouseDown,
interactivity->PointerPressed(leftMouseDown,
WM_LBUTTONDOWN, //pointerUpdateKind
0, // timestamp
modifiers,
@@ -809,11 +788,12 @@ namespace ControlUnitTests
Log::Comment(L"Drag the mouse just a little");
// move not quite a whole cell, but enough to start a selection
const auto cursorPosition1{ cursorPosition0 + til::point{ 6, 0 } };
interactivity->PointerMoved(0,
leftMouseDown,
interactivity->PointerMoved(leftMouseDown,
WM_LBUTTONDOWN, //pointerUpdateKind
modifiers,
cursorPosition1.to_core_point());
true, // focused,
cursorPosition1.to_core_point(),
true);
Log::Comment(L"Verify that there's one selection");
VERIFY_IS_TRUE(core->HasSelection());
@@ -870,11 +850,12 @@ namespace ControlUnitTests
// character in the buffer (if, albeit in a new location).
//
// This helps test GH #14462, a regression from #10749.
interactivity->PointerMoved(0,
leftMouseDown,
interactivity->PointerMoved(leftMouseDown,
WM_LBUTTONDOWN, //pointerUpdateKind
modifiers,
cursorPosition0.to_core_point());
true, // focused,
cursorPosition0.to_core_point(),
true);
VERIFY_IS_TRUE(core->HasSelection());
{
const auto anchor{ core->_terminal->GetSelectionAnchor() };
@@ -895,11 +876,12 @@ namespace ControlUnitTests
expectedAnchor.y -= 1;
expectedEnd.y -= 1;
VERIFY_ARE_EQUAL(scrollbackLength - 3, core->_terminal->GetScrollOffset());
interactivity->PointerMoved(0,
leftMouseDown,
interactivity->PointerMoved(leftMouseDown,
WM_LBUTTONDOWN, //pointerUpdateKind
modifiers,
cursorPosition1.to_core_point());
true, // focused,
cursorPosition1.to_core_point(),
true);
VERIFY_IS_TRUE(core->HasSelection());
{
const auto anchor{ core->_terminal->GetSelectionAnchor() };
@@ -947,8 +929,7 @@ namespace ControlUnitTests
const til::size fontSize{ 9, 21 };
const til::point terminalPosition0{ 5, 5 };
const auto cursorPosition0{ terminalPosition0 * fontSize };
interactivity->PointerPressed(0,
leftMouseDown,
interactivity->PointerPressed(leftMouseDown,
WM_LBUTTONDOWN, //pointerUpdateKind
0, // timestamp
modifiers,
@@ -997,8 +978,7 @@ namespace ControlUnitTests
const til::size fontSize{ 9, 21 };
const til::point terminalPosition0{ 5, 5 };
const auto cursorPosition0{ terminalPosition0 * fontSize };
interactivity->PointerPressed(0,
leftMouseDown,
interactivity->PointerPressed(leftMouseDown,
WM_LBUTTONDOWN, //pointerUpdateKind
0, // timestamp
modifiers,
@@ -1014,8 +994,7 @@ namespace ControlUnitTests
// The viewport is only 30 wide, so clamping 35 to the buffer size gets
// us 29, which converted is (32 + 29 + 1) = 62 = '>'
expectedOutput.push_back(L"\x1b[M >&");
interactivity->PointerPressed(0,
leftMouseDown,
interactivity->PointerPressed(leftMouseDown,
WM_LBUTTONDOWN, //pointerUpdateKind
0, // timestamp
modifiers,
@@ -1030,8 +1009,7 @@ namespace ControlUnitTests
// will be clamped to the top line.
expectedOutput.push_back(L"\x1b[M &!"); // 5, 1
interactivity->PointerPressed(0,
leftMouseDown,
interactivity->PointerPressed(leftMouseDown,
WM_LBUTTONDOWN, //pointerUpdateKind
0, // timestamp
modifiers,
@@ -1047,8 +1025,7 @@ namespace ControlUnitTests
VERIFY_ARE_EQUAL(0, core->ScrollOffset());
Log::Comment(L" --- Click on a spot that's still outside the buffer ---");
expectedOutput.push_back(L"\x1b[M >&");
interactivity->PointerPressed(0,
leftMouseDown,
interactivity->PointerPressed(leftMouseDown,
WM_LBUTTONDOWN, //pointerUpdateKind
0, // timestamp
modifiers,
@@ -1062,8 +1039,7 @@ namespace ControlUnitTests
Log::Comment(L" --- Click on a spot that's NOW INSIDE the buffer ---");
// (32 + 35 + 1) = 68 = 'D'
expectedOutput.push_back(L"\x1b[M D&");
interactivity->PointerPressed(0,
leftMouseDown,
interactivity->PointerPressed(leftMouseDown,
WM_LBUTTONDOWN, //pointerUpdateKind
0, // timestamp
modifiers,

View File

@@ -315,29 +315,16 @@ AppHost* WindowEmperor::_mostRecentWindow() const noexcept
void WindowEmperor::HandleCommandlineArgs(int nCmdShow)
{
// When running without package identity, set an explicit AppUserModelID so
// that toast notifications (and other shell features like taskbar grouping)
// work correctly. We include...
// - a hash of the executable path
// - a hash of the user SID
// This prevents crosstalk between different portable/unpackaged installations.
// The same isolation strategy is used for the single-instance mutex below.
std::wstring unpackagedAumid;
std::wstring windowClassName;
windowClassName.reserve(64); // "Windows Terminal Preview Admin 0123456789012345 0123456789012345"
#if defined(WT_BRANDING_RELEASE)
windowClassName.append(L"Windows Terminal");
unpackagedAumid = L"Microsoft.WindowsTerminal";
#elif defined(WT_BRANDING_PREVIEW)
windowClassName.append(L"Windows Terminal Preview");
unpackagedAumid = L"Microsoft.WindowsTerminalPreview";
#elif defined(WT_BRANDING_CANARY)
windowClassName.append(L"Windows Terminal Canary");
unpackagedAumid = L"Microsoft.WindowsTerminalCanary";
#else
windowClassName.append(L"Windows Terminal Dev");
unpackagedAumid = L"WindowsTerminalDev";
#endif
if (Utils::IsRunningElevated())
{
@@ -349,10 +336,8 @@ void WindowEmperor::HandleCommandlineArgs(int nCmdShow)
const auto hash = til::hash(path);
#ifdef _WIN64
fmt::format_to(std::back_inserter(windowClassName), FMT_COMPILE(L" {:016x}"), hash);
fmt::format_to(std::back_inserter(unpackagedAumid), FMT_COMPILE(L".{:016x}"), hash);
#else
fmt::format_to(std::back_inserter(windowClassName), FMT_COMPILE(L" {:08x}"), hash);
fmt::format_to(std::back_inserter(unpackagedAumid), FMT_COMPILE(L".{:08x}"), hash);
#endif
}
@@ -366,15 +351,6 @@ void WindowEmperor::HandleCommandlineArgs(int nCmdShow)
#else
fmt::format_to(std::back_inserter(windowClassName), FMT_COMPILE(L" {:08x}"), hash);
#endif
if (!IsPackaged())
{
#ifdef _WIN64
fmt::format_to(std::back_inserter(unpackagedAumid), FMT_COMPILE(L".{:016x}"), hash);
#else
fmt::format_to(std::back_inserter(unpackagedAumid), FMT_COMPILE(L".{:08x}"), hash);
#endif
LOG_IF_FAILED(SetCurrentProcessExplicitAppUserModelID(unpackagedAumid.c_str()));
}
}
// Windows Terminal is a single-instance application. Either acquire ownership

View File

@@ -87,5 +87,4 @@
X(bool, ShowMarks, false) \
X(winrt::Microsoft::Terminal::Control::CopyFormat, CopyFormatting, 0) \
X(bool, RightClickContextMenu, false) \
X(winrt::Microsoft::Terminal::Control::PathTranslationStyle, PathTranslationStyle, winrt::Microsoft::Terminal::Control::PathTranslationStyle::None) \
X(winrt::hstring, DragDropDelimiter, L" ")
X(winrt::Microsoft::Terminal::Control::PathTranslationStyle, PathTranslationStyle, winrt::Microsoft::Terminal::Control::PathTranslationStyle::None)

View File

@@ -400,16 +400,20 @@ static FillConsoleResult FillConsoleImpl(SCREEN_INFORMATION& screenInfo, FillCon
// See FillConsoleOutputCharacterWImpl and its identical code.
if (enablePowershellShim)
{
const auto currentBufferDimensions{ OutContext.GetBufferSize().Dimensions() };
const auto wroteWholeBuffer = lengthToWrite == (currentBufferDimensions.area<size_t>());
const auto startedAtOrigin = startingCoordinate == til::point{ 0, 0 };
const auto wroteSpaces = attribute == (FOREGROUND_BLUE | FOREGROUND_GREEN | FOREGROUND_RED);
if (wroteWholeBuffer && startedAtOrigin && wroteSpaces)
auto& gci = ServiceLocator::LocateGlobals().getConsoleInformation();
if (const auto writer = gci.GetVtWriterForBuffer(&OutContext))
{
// PowerShell has previously called FillConsoleOutputCharacterW() which triggered a call to WriteClearScreen().
cellsModified = lengthToWrite;
return S_OK;
const auto currentBufferDimensions{ OutContext.GetBufferSize().Dimensions() };
const auto wroteWholeBuffer = lengthToWrite == (currentBufferDimensions.area<size_t>());
const auto startedAtOrigin = startingCoordinate == til::point{ 0, 0 };
const auto wroteSpaces = attribute == (FOREGROUND_BLUE | FOREGROUND_GREEN | FOREGROUND_RED);
if (wroteWholeBuffer && startedAtOrigin && wroteSpaces)
{
// PowerShell has previously called FillConsoleOutputCharacterW() which triggered a call to WriteClearScreen().
cellsModified = lengthToWrite;
return S_OK;
}
}
}
@@ -453,23 +457,21 @@ static FillConsoleResult FillConsoleImpl(SCREEN_INFORMATION& screenInfo, FillCon
// their entire buffer will be cleared as well.
if (enablePowershellShim)
{
const auto currentBufferDimensions{ OutContext.GetBufferSize().Dimensions() };
const auto wroteWholeBuffer = lengthToWrite == (currentBufferDimensions.area<size_t>());
const auto startedAtOrigin = startingCoordinate == til::point{ 0, 0 };
const auto wroteSpaces = character == UNICODE_SPACE;
if (wroteWholeBuffer && startedAtOrigin && wroteSpaces)
auto& gci = ServiceLocator::LocateGlobals().getConsoleInformation();
if (auto writer = gci.GetVtWriterForBuffer(&OutContext))
{
WriteClearScreen(OutContext);
const auto currentBufferDimensions{ OutContext.GetBufferSize().Dimensions() };
const auto wroteWholeBuffer = lengthToWrite == (currentBufferDimensions.area<size_t>());
const auto startedAtOrigin = startingCoordinate == til::point{ 0, 0 };
const auto wroteSpaces = character == UNICODE_SPACE;
auto& gci = ServiceLocator::LocateGlobals().getConsoleInformation();
if (auto writer = gci.GetVtWriterForBuffer(&OutContext))
if (wroteWholeBuffer && startedAtOrigin && wroteSpaces)
{
WriteClearScreen(OutContext);
writer.Submit();
cellsModified = lengthToWrite;
return S_OK;
}
cellsModified = lengthToWrite;
return S_OK;
}
}

View File

@@ -40,12 +40,6 @@
"Execution": {
"AdditionalParameter": "/select:\"@IsPerfTest=true\""
}
},
{
"Name": "NoAppPlatform",
"Execution": {
"AdditionalParameter": "/select:\"not(@Name='PolicyTests::*')\""
}
}
]
}
}

View File

@@ -982,20 +982,23 @@ void ApiRoutines::GetLargestConsoleWindowSizeImpl(const SCREEN_INFORMATION& cont
// A null character will get translated to whitespace.
fillCharacter = Microsoft::Console::VirtualTerminal::VtIo::SanitizeUCS2(fillCharacter);
// GH#3126 - This is a shim for cmd's `cls` function. In the
// legacy console, `cls` is supposed to clear the entire buffer.
// We always use a VT sequence, even if ConPTY isn't used, because those are faster nowadays.
if (enableCmdShim &&
source.left <= 0 && source.top <= 0 &&
source.right >= bufferSize.RightInclusive() && source.bottom >= bufferSize.BottomInclusive() &&
target.x == 0 && target.y <= -bufferSize.BottomExclusive() &&
!clip &&
fillCharacter == UNICODE_SPACE && fillAttribute == buffer.GetAttributes().GetLegacyAttributes())
{
WriteClearScreen(context);
}
else if (writer)
if (writer)
{
// GH#3126 - This is a shim for cmd's `cls` function. In the
// legacy console, `cls` is supposed to clear the entire buffer.
// We always use a VT sequence, even if ConPTY isn't used, because those are faster nowadays.
if (enableCmdShim &&
source.left <= 0 && source.top <= 0 &&
source.right >= bufferSize.RightInclusive() && source.bottom >= bufferSize.BottomInclusive() &&
target.x == 0 && target.y <= -bufferSize.BottomExclusive() &&
!clip &&
fillCharacter == UNICODE_SPACE && fillAttribute == buffer.GetAttributes().GetLegacyAttributes())
{
WriteClearScreen(context);
writer.Submit();
return S_OK;
}
const auto clipViewport = clip ? Viewport::FromInclusive(*clip).Clamp(bufferSize) : bufferSize;
const auto sourceViewport = Viewport::FromInclusive(source);
const auto fillViewport = sourceViewport.Clamp(clipViewport);
@@ -1081,6 +1084,8 @@ void ApiRoutines::GetLargestConsoleWindowSizeImpl(const SCREEN_INFORMATION& cont
RETURN_IF_FAILED(WriteConsoleOutputWImplHelper(context, fill, w, fillViewport, writtenViewport));
RETURN_IF_FAILED(WriteConsoleOutputWImplHelper(context, backup, w, Viewport::FromDimensions(target, readViewport.Dimensions()).Clamp(clipViewport), writtenViewport));
}
writer.Submit();
}
else
{
@@ -1088,11 +1093,6 @@ void ApiRoutines::GetLargestConsoleWindowSizeImpl(const SCREEN_INFORMATION& cont
ScrollRegion(buffer, source, clip, target, fillCharacter, useThisAttr);
}
if (writer)
{
writer.Submit();
}
return S_OK;
}
CATCH_RETURN();

View File

@@ -859,15 +859,14 @@ PWSTR TranslateConsoleTitle(_In_ PCWSTR pwszConsoleTitle, const BOOL fUnexpand,
return Status;
}
if (ConsoleConnectionDeservesVisibleWindow(p))
// Allow the renderer to paint once the rest of the console is hooked up.
if (g.pRender)
{
// Allow the renderer to paint once the rest of the console is hooked up,
// but only if there's actually something to paint on.
if (g.pRender)
{
g.pRender->EnablePainting();
}
g.pRender->EnablePainting();
}
if (SUCCEEDED_NTSTATUS(Status) && ConsoleConnectionDeservesVisibleWindow(p))
{
HANDLE Thread = nullptr;
IConsoleInputThread* pNewThread = nullptr;

View File

@@ -18,17 +18,10 @@ class SearchTests
{
TEST_CLASS(SearchTests);
CommonState* m_state{ nullptr };
CommonState* m_state;
TEST_CLASS_SETUP(ClassSetup)
{
wil::unique_hmodule icu{ LoadLibraryExW(L"icu.dll", nullptr, LOAD_LIBRARY_SEARCH_SYSTEM32) };
if (!icu)
{
Log::Result(TestResults::Skipped, L"ICU is not present");
return true;
}
m_state = new CommonState();
m_state->PrepareGlobalScreenBuffer();
return true;
@@ -36,11 +29,8 @@ class SearchTests
TEST_CLASS_CLEANUP(ClassCleanup)
{
if (m_state)
{
m_state->CleanupGlobalScreenBuffer();
delete m_state;
}
m_state->CleanupGlobalScreenBuffer();
delete m_state;
return true;
}

View File

@@ -143,7 +143,7 @@ class TextBufferTests
void WriteLinesToBuffer(const std::vector<std::wstring>& text, TextBuffer& buffer);
TEST_METHOD(GetWordBoundaries);
TEST_METHOD(MoveByWord);
TEST_METHOD(GetGlyphBoundaries);
TEST_METHOD(GetTextRects);
@@ -2039,12 +2039,12 @@ void TextBufferTests::GetWordBoundaries()
// Test Data:
// - til::point - starting position
// - til::point - expected result (includeWhitespace = false)
// - til::point - expected result (includeWhitespace = true)
// - til::point - expected result (accessibilityMode = false)
// - til::point - expected result (accessibilityMode = true)
struct ExpectedResult
{
til::point selectionMode;
til::point accessibilityMode;
til::point accessibilityModeDisabled;
til::point accessibilityModeEnabled;
};
struct Test
@@ -2056,8 +2056,7 @@ void TextBufferTests::GetWordBoundaries()
// Set testData for GetWordStart tests
// clang-format off
std::vector<Test> testData = {
// tests for first line of text ("word other" + spaces)
// selectionMode accessibilityMode
// tests for first line of text
{ { 0, 0 }, {{ 0, 0 }, { 0, 0 }} },
{ { 1, 0 }, {{ 0, 0 }, { 0, 0 }} },
{ { 3, 0 }, {{ 0, 0 }, { 0, 0 }} },
@@ -2067,7 +2066,7 @@ void TextBufferTests::GetWordBoundaries()
{ { 20, 0 }, {{ 10, 0 }, { 5, 0 }} },
{ { 79, 0 }, {{ 10, 0 }, { 5, 0 }} },
// tests for second line of text (" more words" + spaces)
// tests for second line of text
{ { 0, 1 }, {{ 0, 1 }, { 5, 0 }} },
{ { 1, 1 }, {{ 0, 1 }, { 5, 0 }} },
{ { 2, 1 }, {{ 2, 1 }, { 2, 1 }} },
@@ -2083,56 +2082,54 @@ void TextBufferTests::GetWordBoundaries()
// clang-format on
BEGIN_TEST_METHOD_PROPERTIES()
TEST_METHOD_PROPERTY(L"Data:includeWhitespace", L"{false, true}")
TEST_METHOD_PROPERTY(L"Data:accessibilityMode", L"{false, true}")
END_TEST_METHOD_PROPERTIES();
bool includeWhitespace;
VERIFY_SUCCEEDED(TestData::TryGetValue(L"includeWhitespace", includeWhitespace), L"Get includeWhitespace variant");
bool accessibilityMode;
VERIFY_SUCCEEDED(TestData::TryGetValue(L"accessibilityMode", accessibilityMode), L"Get accessibility mode variant");
const std::wstring_view delimiters = L" ";
for (const auto& test : testData)
{
Log::Comment(NoThrowString().Format(L"til::point (%hd, %hd)", test.startPos.x, test.startPos.y));
const auto result = _buffer->GetWordStart(test.startPos, delimiters, includeWhitespace);
const auto expected = includeWhitespace ? test.expected.accessibilityMode : test.expected.selectionMode;
const auto result = _buffer->GetWordStart(test.startPos, delimiters, accessibilityMode);
const auto expected = accessibilityMode ? test.expected.accessibilityModeEnabled : test.expected.accessibilityModeDisabled;
VERIFY_ARE_EQUAL(expected, result);
}
// Update testData for GetWordEnd tests
// Note: GetWordEnd returns exclusive end positions
// clang-format off
testData = {
// tests for first line of text ("word other" + spaces)
// selectionMode accessibilityMode
{ { 0, 0 }, { { 4, 0 }, { 5, 0 } } },
{ { 1, 0 }, { { 4, 0 }, { 5, 0 } } },
{ { 3, 0 }, { { 4, 0 }, { 5, 0 } } },
{ { 4, 0 }, { { 5, 0 }, { 5, 0 } } },
{ { 5, 0 }, { { 10, 0 }, { 2, 1 } } },
{ { 6, 0 }, { { 10, 0 }, { 2, 1 } } },
{ { 20, 0 }, { { 80, 0 }, { 2, 1 } } },
{ { 79, 0 }, { { 80, 0 }, { 2, 1 } } },
// tests for first line of text
{ { 0, 0 }, { { 3, 0 }, { 5, 0 } } },
{ { 1, 0 }, { { 3, 0 }, { 5, 0 } } },
{ { 3, 0 }, { { 3, 0 }, { 5, 0 } } },
{ { 4, 0 }, { { 4, 0 }, { 5, 0 } } },
{ { 5, 0 }, { { 9, 0 }, { 2, 1 } } },
{ { 6, 0 }, { { 9, 0 }, { 2, 1 } } },
{ { 20, 0 }, { { 79, 0 }, { 2, 1 } } },
{ { 79, 0 }, { { 79, 0 }, { 2, 1 } } },
// tests for second line of text (" more words" + spaces)
{ { 0, 1 }, { { 2, 1 }, { 2, 1 } } },
{ { 1, 1 }, { { 2, 1 }, { 2, 1 } } },
{ { 2, 1 }, { { 6, 1 }, { 9, 1 } } },
{ { 3, 1 }, { { 6, 1 }, { 9, 1 } } },
{ { 5, 1 }, { { 6, 1 }, { 9, 1 } } },
{ { 6, 1 }, { { 9, 1 }, { 9, 1 } } },
{ { 7, 1 }, { { 9, 1 }, { 9, 1 } } },
{ { 9, 1 }, { { 14, 1 }, { 80, 9000 } } },
{ { 10, 1 }, { { 14, 1 }, { 80, 9000 } } },
{ { 20, 1 }, { { 80, 1 }, { 80, 9000 } } },
{ { 79, 1 }, { { 80, 1 }, { 80, 9000 } } },
// tests for second line of text
{ { 0, 1 }, { { 1, 1 }, { 2, 1 } } },
{ { 1, 1 }, { { 1, 1 }, { 2, 1 } } },
{ { 2, 1 }, { { 5, 1 }, { 9, 1 } } },
{ { 3, 1 }, { { 5, 1 }, { 9, 1 } } },
{ { 5, 1 }, { { 5, 1 }, { 9, 1 } } },
{ { 6, 1 }, { { 8, 1 }, { 9, 1 } } },
{ { 7, 1 }, { { 8, 1 }, { 9, 1 } } },
{ { 9, 1 }, { { 13, 1 }, { 0, 9001 } } },
{ { 10, 1 }, { { 13, 1 }, { 0, 9001 } } },
{ { 20, 1 }, { { 79, 1 }, { 0, 9001 } } },
{ { 79, 1 }, { { 79, 1 }, { 0, 9001 } } },
};
// clang-format on
for (const auto& test : testData)
{
Log::Comment(NoThrowString().Format(L"til::point (%hd, %hd)", test.startPos.x, test.startPos.y));
auto result = _buffer->GetWordEnd(test.startPos, delimiters, includeWhitespace);
const auto expected = includeWhitespace ? test.expected.accessibilityMode : test.expected.selectionMode;
auto result = _buffer->GetWordEnd(test.startPos, delimiters, accessibilityMode);
const auto expected = accessibilityMode ? test.expected.accessibilityModeEnabled : test.expected.accessibilityModeDisabled;
VERIFY_ARE_EQUAL(expected, result);
}
@@ -2164,7 +2161,6 @@ void TextBufferTests::GetWordBoundaries()
// clang-format off
testData = {
// selectionMode accessibilityMode
{ { 0, 0 }, { { 0, 0 }, { 0, 0 } } },
{ { 1, 0 }, { { 0, 0 }, { 0, 0 } } },
{ { 4, 0 }, { { 4, 0 }, { 0, 0 } } },
@@ -2177,11 +2173,11 @@ void TextBufferTests::GetWordBoundaries()
{ { 0, 2 }, { { 0, 2 }, { 0, 2 } } },
{ { 9, 2 }, { { 0, 2 }, { 0, 2 } } },
// v accessibility does not consider wrapping
{ { 0, 3 }, { { 0, 3 }, { 0, 2 } } },
{ { 7, 3 }, { { 6, 3 }, { 0, 2 } } },
// v selection mode now also crosses wrapped rows for ControlChar
{ { 1, 4 }, { { 6, 3 }, { 0, 2 } } },
// v accessibility does not consider wrapping
{ { 1, 4 }, { { 0, 4 }, { 0, 2 } } },
{ { 4, 4 }, { { 4, 4 }, { 4, 4 } } },
{ { 8, 4 }, { { 4, 4 }, { 4, 4 } } },
@@ -2192,8 +2188,8 @@ void TextBufferTests::GetWordBoundaries()
for (const auto& test : testData)
{
Log::Comment(NoThrowString().Format(L"Testing til::point (%hd, %hd)", test.startPos.x, test.startPos.y));
const auto result = _buffer->GetWordStart(test.startPos, delimiters, includeWhitespace);
const auto expected = includeWhitespace ? test.expected.accessibilityMode : test.expected.selectionMode;
const auto result = _buffer->GetWordStart(test.startPos, delimiters, accessibilityMode);
const auto expected = accessibilityMode ? test.expected.accessibilityModeEnabled : test.expected.accessibilityModeDisabled;
VERIFY_ARE_EQUAL(expected, result);
}
@@ -2209,43 +2205,123 @@ void TextBufferTests::GetWordBoundaries()
// clang-format off
testData = {
// tests for first line of text
// selectionMode accessibilityMode
{ { 0, 0 }, { { 4, 0 }, { 5, 0 } } },
{ { 1, 0 }, { { 4, 0 }, { 5, 0 } } },
{ { 4, 0 }, { { 5, 0 }, { 5, 0 } } },
{ { 5, 0 }, { { 8, 1 }, { 0, 2 } } },
{ { 7, 0 }, { { 8, 1 }, { 0, 2 } } },
{ { 0, 0 }, { { 3, 0 }, { 5, 0 } } },
{ { 1, 0 }, { { 3, 0 }, { 5, 0 } } },
{ { 4, 0 }, { { 4, 0 }, { 5, 0 } } },
{ { 5, 0 }, { { 7, 1 }, { 0, 2 } } },
{ { 7, 0 }, { { 7, 1 }, { 0, 2 } } },
{ { 4, 1 }, { { 8, 1 }, { 0, 2 } } },
{ { 7, 1 }, { { 8, 1 }, { 0, 2 } } },
{ { 9, 1 }, { { 10, 1 }, { 0, 2 } } },
{ { 4, 1 }, { { 7, 1 }, { 0, 2 } } },
{ { 7, 1 }, { { 7, 1 }, { 0, 2 } } },
{ { 9, 1 }, { { 9, 1 }, { 0, 2 } } },
{ { 0, 2 }, { { 10, 2 }, { 4, 4 } } },
{ { 9, 2 }, { { 10, 2 }, { 4, 4 } } },
{ { 0, 2 }, { { 9, 2 }, { 4, 4 } } },
{ { 9, 2 }, { { 9, 2 }, { 4, 4 } } },
{ { 0, 3 }, { { 6, 3 }, { 4, 4 } } },
{ { 7, 3 }, { { 4, 4 }, { 4, 4 } } },
{ { 0, 3 }, { { 5, 3 }, { 4, 4 } } },
{ { 7, 3 }, { { 9, 3 }, { 4, 4 } } },
{ { 1, 4 }, { { 4, 4 }, { 4, 4 } } },
{ { 4, 4 }, { { 1, 5 }, { 2, 5 } } },
{ { 8, 4 }, { { 1, 5 }, { 2, 5 } } },
{ { 1, 4 }, { { 3, 4 }, { 4, 4 } } },
{ { 4, 4 }, { { 0, 5 }, { 2, 5 } } },
{ { 8, 4 }, { { 0, 5 }, { 2, 5 } } },
{ { 0, 5 }, { { 1, 5 }, { 2, 5 } } },
{ { 1, 5 }, { { 2, 5 }, { 2, 5 } } },
{ { 4, 5 }, { { 10, 5 }, { 10, 5 } } },
{ { 9, 5 }, { { 10, 5 }, { 10, 5 } } },
{ { 0, 5 }, { { 0, 5 }, { 2, 5 } } },
{ { 1, 5 }, { { 1, 5 }, { 2, 5 } } },
{ { 4, 5 }, { { 9, 5 }, { 0, 6 } } },
{ { 9, 5 }, { { 9, 5 }, { 0, 6 } } },
};
// clang-format on
for (const auto& test : testData)
{
Log::Comment(NoThrowString().Format(L"TestEnd til::point (%hd, %hd)", test.startPos.x, test.startPos.y));
auto result = _buffer->GetWordEnd(test.startPos, delimiters, includeWhitespace);
const auto expected = includeWhitespace ? test.expected.accessibilityMode : test.expected.selectionMode;
auto result = _buffer->GetWordEnd(test.startPos, delimiters, accessibilityMode);
const auto expected = accessibilityMode ? test.expected.accessibilityModeEnabled : test.expected.accessibilityModeDisabled;
VERIFY_ARE_EQUAL(expected, result);
}
}
void TextBufferTests::MoveByWord()
{
til::size bufferSize{ 80, 9001 };
UINT cursorSize = 12;
TextAttribute attr{ 0x7f };
auto _buffer = std::make_unique<TextBuffer>(bufferSize, attr, cursorSize, false, &_renderer);
// Setup: Write lines of text to the buffer
const std::vector<std::wstring> text = { L"word other",
L" more words" };
WriteLinesToBuffer(text, *_buffer);
// Test Data:
// - til::point - starting position
// - til::point - expected result (moving forwards)
// - til::point - expected result (moving backwards)
struct ExpectedResult
{
til::point moveForwards;
til::point moveBackwards;
};
struct Test
{
til::point startPos;
ExpectedResult expected;
};
// Set testData for GetWordStart tests
// clang-format off
std::vector<Test> testData = {
// tests for first line of text
{ { 0, 0 }, {{ 5, 0 }, { 0, 0 }} },
{ { 1, 0 }, {{ 5, 0 }, { 1, 0 }} },
{ { 3, 0 }, {{ 5, 0 }, { 3, 0 }} },
{ { 4, 0 }, {{ 5, 0 }, { 4, 0 }} },
{ { 5, 0 }, {{ 2, 1 }, { 0, 0 }} },
{ { 6, 0 }, {{ 2, 1 }, { 0, 0 }} },
{ { 20, 0 }, {{ 2, 1 }, { 0, 0 }} },
{ { 79, 0 }, {{ 2, 1 }, { 0, 0 }} },
// tests for second line of text
{ { 0, 1 }, {{ 2, 1 }, { 0, 0 }} },
{ { 1, 1 }, {{ 2, 1 }, { 0, 0 }} },
{ { 2, 1 }, {{ 9, 1 }, { 5, 0 }} },
{ { 3, 1 }, {{ 9, 1 }, { 5, 0 }} },
{ { 5, 1 }, {{ 9, 1 }, { 5, 0 }} },
{ { 6, 1 }, {{ 9, 1 }, { 5, 0 }} },
{ { 7, 1 }, {{ 9, 1 }, { 5, 0 }} },
{ { 9, 1 }, {{ 9, 1 }, { 2, 1 }} },
{ { 10, 1 }, {{10, 1 }, { 2, 1 }} },
{ { 20, 1 }, {{20, 1 }, { 2, 1 }} },
{ { 79, 1 }, {{79, 1 }, { 2, 1 }} },
};
// clang-format on
BEGIN_TEST_METHOD_PROPERTIES()
TEST_METHOD_PROPERTY(L"Data:movingForwards", L"{false, true}")
END_TEST_METHOD_PROPERTIES();
bool movingForwards;
VERIFY_SUCCEEDED(TestData::TryGetValue(L"movingForwards", movingForwards), L"Get movingForwards variant");
const std::wstring_view delimiters = L" ";
const auto lastCharPos = _buffer->GetLastNonSpaceCharacter();
for (const auto& test : testData)
{
Log::Comment(NoThrowString().Format(L"COORD (%hd, %hd)", test.startPos.x, test.startPos.y));
auto pos{ test.startPos };
const auto result = movingForwards ?
_buffer->MoveToNextWord(pos, delimiters, lastCharPos) :
_buffer->MoveToPreviousWord(pos, delimiters);
const auto expected = movingForwards ? test.expected.moveForwards : test.expected.moveBackwards;
VERIFY_ARE_EQUAL(expected, pos);
// if we moved, result is true and pos != startPos.
// otherwise, result is false and pos == startPos.
VERIFY_ARE_EQUAL(result, pos != test.startPos);
}
}
void TextBufferTests::GetGlyphBoundaries()
{
struct ExpectedResult

View File

@@ -444,15 +444,7 @@ VOID ConIoSrvComm::HandleFocusEvent(const CIS_EVENT* const Event)
// TODO: MSFT: 11833883 - Determine action when wait on paint operation via
// DirectX on OneCoreUAP times out while switching console
// applications.
UnlockConsole();
// Teardown may need to wait for an entire frame to finish, but it will not be
// able to do so while we are holding the console lock. Relinquish the lock
// for as long as it takes to quiesce the render thread, and then take it back
// afterwards. This is globally safe because ConIoSrv will not process any other
// requests while the focus event is outstanding.
Renderer->TriggerTeardown();
LockConsole();
// Relinquish control of the graphics device (only one
// DirectX application may control the device at any one

View File

@@ -12,11 +12,7 @@ namespace Microsoft::Console::Render::Atlas
#ifdef NDEBUG
#define ATLAS_DEBUG__IS_DEBUG 0
#else
#ifdef __INSIDE_WINDOWS
#define ATLAS_DEBUG__IS_DEBUG 0
#else
#define ATLAS_DEBUG__IS_DEBUG 1
#endif
#endif
// If set to 1, this will cause the entire viewport to be invalidated at all times.

View File

@@ -789,8 +789,22 @@ bool Renderer::_CheckViewportAndScroll()
void Renderer::_scheduleRenditionBlink()
{
const auto& buffer = _pData->GetTextBuffer();
const auto blinkUsed = buffer.ContainsBlinkAttributeInRegion(_viewport);
bool blinkUsed = false;
for (auto row = _viewport.Top(); row < _viewport.BottomExclusive(); ++row)
{
const auto& r = buffer.GetRowByOffset(row);
for (const auto& attr : r.Attributes())
{
if (attr.IsBlinking())
{
blinkUsed = true;
goto why_does_cpp_not_have_labeled_loops;
}
}
}
why_does_cpp_not_have_labeled_loops:
if (blinkUsed != IsTimerRunning(_renditionBlinker))
{
if (blinkUsed)
@@ -1516,7 +1530,7 @@ void Renderer::_updateCursorInfo()
_currentCursorOptions.lineRendition = lineRendition;
_currentCursorOptions.ulCursorHeightPercent = cursorHeight;
_currentCursorOptions.cursorPixelWidth = _pData->GetCursorPixelWidth();
_currentCursorOptions.fIsDoubleWidth = buffer.IsGlyphDoubleWidthAt(cursorPosition);
_currentCursorOptions.fIsDoubleWidth = buffer.GetRowByOffset(cursorPosition.y).DbcsAttrAt(cursorPosition.x) != DbcsAttribute::Single;
_currentCursorOptions.cursorType = cursor.GetType();
_currentCursorOptions.fUseColor = useColor;
_currentCursorOptions.cursorColor = cursorColor;

View File

@@ -2,8 +2,5 @@
"$schema": "http://universaltest/schema/testlist-2.json",
"Testlists": [
{ "FilePath": "Microsoft.Console.Tests.testlist" }
],
"TestMDs" : [
{ "FilePath": "Microsoft.Console.Host.FeatureTests.testmd" }
]
}
]
}

View File

@@ -2,8 +2,5 @@
"$schema": "http://universaltest/schema/testlist-2.json",
"Testlists": [
{ "FilePath": "Microsoft.Console.Tests.testlist" }
],
"TestMDs" : [
{ "FilePath": "Microsoft.Console.Host.FeatureTests.testmd" }
]
}
]
}

View File

@@ -1,14 +0,0 @@
{
"$schema": "http://universaltest/schema/testlist-3.json",
"Testlists": [
{
"FilePath": "Microsoft.Console.Tests.testlist"
}
],
"TestMDs": [
{
"FilePath": "Microsoft.Console.Host.FeatureTests.testmd",
"Profile": "NoAppPlatform"
}
]
}

View File

@@ -3,6 +3,7 @@
"TestMDs" : [
{ "FilePath": "Microsoft.Console.Host.UnitTests.testmd" },
{ "FilePath": "Microsoft.Console.TextBuffer.UnitTests.testmd" },
{ "FilePath": "Microsoft.Console.Host.FeatureTests.testmd" },
{ "FilePath": "Microsoft.Console.VirtualTerminal.Adapter.UnitTests.testmd" },
{ "FilePath": "Microsoft.Console.VirtualTerminal.Parser.UnitTests.testmd" },
{ "FilePath": "Microsoft.Console.Conpty.UnitTests.testmd" },

View File

@@ -8,7 +8,6 @@ TESTLIST_SOURCES=\
Microsoft.Console.TestLab.Desktop.testlist \
Microsoft.Console.TestLab.OneCoreUap.testlist \
Microsoft.Console.TestLab.Performance.testlist \
Microsoft.Console.TestLab.Win3.testlist \
TESTLIST_REFERENCE_DIRS=\
$(OBJ_PATH)\..\interactivity\win32\ut_interactivity_win32\$O \

View File

@@ -14,7 +14,7 @@ Handle Handle::Create()
handle._impl = new Implementation();
if (FAILED(handle._impl->Initialize()))
{
handle._destroy();
delete handle._impl;
handle._impl = nullptr;
}
return handle;
@@ -32,7 +32,11 @@ void Handle::SetDefaultScopeAlphanumericHalfWidth(bool enable)
Handle::~Handle()
{
_destroy();
if (_impl)
{
_impl->Uninitialize();
_impl->Release();
}
}
Handle::Handle(Handle&& other) noexcept :
@@ -90,12 +94,3 @@ bool Handle::HasActiveComposition() const noexcept
{
return _impl ? _impl->HasActiveComposition() : false;
}
void Handle::_destroy() noexcept
{
if (_impl)
{
_impl->Uninitialize();
_impl->Release();
}
}

View File

@@ -51,8 +51,6 @@ namespace Microsoft::Console::TSF
bool HasActiveComposition() const noexcept;
private:
void _destroy() noexcept;
Implementation* _impl = nullptr;
};
}

View File

@@ -1490,25 +1490,19 @@ void UiaTextRangeBase::_moveEndpointByUnitWord(_In_ const int moveCount,
{
success = false;
}
else if (buffer.MoveToNextWord(nextPos, _wordDelimiters, documentEnd))
{
resultPos = nextPos;
(*pAmountMoved)++;
}
else if (allowBottomExclusive)
{
resultPos = documentEnd;
(*pAmountMoved)++;
}
else
{
// Move to the end of the current word (including trailing whitespace),
// which is also the start of the next word
const auto wordEnd = buffer.GetWordEnd(nextPos, _wordDelimiters, true, documentEnd);
if (wordEnd < documentEnd)
{
resultPos = wordEnd;
(*pAmountMoved)++;
}
else if (allowBottomExclusive)
{
resultPos = documentEnd;
(*pAmountMoved)++;
}
else
{
success = false;
}
success = false;
}
break;
}
@@ -1526,22 +1520,14 @@ void UiaTextRangeBase::_moveEndpointByUnitWord(_In_ const int moveCount,
// to the next branch and move to the previous word!
(*pAmountMoved)--;
}
else if (buffer.MoveToPreviousWord(nextPos, _wordDelimiters))
{
resultPos = nextPos;
(*pAmountMoved)--;
}
else
{
// Move to the beginning of the current word
auto copy = buffer.GetWordStart(nextPos, _wordDelimiters, true, documentEnd);
// Step back one position, then find the start of that word
if (!buffer.GetSize().DecrementInBounds(copy, true))
{
// can't move behind current word
resultPos = bufferOrigin;
}
else
{
resultPos = buffer.GetWordStart(copy, _wordDelimiters, true, documentEnd);
(*pAmountMoved)--;
}
resultPos = bufferOrigin;
}
break;
}

View File

@@ -28,9 +28,6 @@ TARGETLIBS = \
$(ONECORE_EXTERNAL_SDK_LIB_PATH)\ntdll.lib \
$(TARGETLIBS) \
DELAYLOAD = \
icu.dll \
# -------------------------------------
# Localization
# -------------------------------------

View File

@@ -39,8 +39,7 @@ static Pipes createPipes()
VERIFY_IS_TRUE(SetHandleInformation(p.our.out.get(), HANDLE_FLAG_INHERIT, 0));
// ConPTY requests a DA1 report on startup. Emulate the response from the terminal.
DWORD written{};
WriteFile(p.our.in.get(), "\x1b[?61c", 6, &written, nullptr);
WriteFile(p.our.in.get(), "\x1b[?61c", 6, nullptr, nullptr);
return p;
}
@@ -126,7 +125,6 @@ static HRESULT AttachPseudoConsole(HPCON hPC, std::wstring command, PROCESS_INFO
STARTUPINFOEXW siEx{};
siEx.StartupInfo.cb = sizeof(STARTUPINFOEXW);
siEx.StartupInfo.dwFlags = STARTF_USESTDHANDLES; // we will leave the handles empty to ensure none are inherited.
siEx.lpAttributeList = reinterpret_cast<PPROC_THREAD_ATTRIBUTE_LIST>(buffer.get());
RETURN_IF_WIN32_BOOL_FALSE(InitializeProcThreadAttributeList(siEx.lpAttributeList, 1, 0, &size));