These do not notionally belong to TermControl; as we prepare to move
automatic scrolling down into the Interactivity layer (for
WpfTerminalControl to depend on,) we're going to need to track these in
Interactivity too.
This also converts the arguments from the winrt-specific
Foundation::Point to Core::Point, and simplifies some of the signatures
to no longer pass things we do not need to pass.
Right now, this should result in no functional change.
Some of the tests are sensitive to the fact that we never loaded
`SPI_GETWHEELSCROLLLINES`
and instead defaulted to `1`. They've been hammered back into shape.
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
## 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
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
## 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
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`.
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 ✅)
## Summary of the Pull Request
This PR introduces a new profile setting, `dragDropDelimiter`, which
allows users to configure the string separator used when dragging and
dropping multiple files into the terminal. The default behavior remains
a single space (`" "`) for backward compatibility.
## References and Relevant Issues
* Closes#19565
## Detailed Description of the Pull Request / Additional comments
**Implementation Details:**
* **Settings:** Added `DragDropDelimiter` to `MTSMSettings.h` and
`Profile.idl`.
* **Control:** Wired the setting through `ControlProperties.h` so the
terminal logic can see it.
* **Logic:** Updated `TermControl::OnDrop` to use the new delimiter when
joining paths.
* **UI:** Added the text box in the Advanced Settings page and updated
the ViewModel.
## Validation Steps Performed
* **Manual Verification:**
* Verified default behavior (space separator) works as before.
* Configured `dragDropDelimiter` to `", "`, `";"`, and custom strings in
`settings.json` and from settings UI.
* Confirmed dropped files are joined correctly.
* **Build:** Validated that the solution builds cleanly.
## Notes for Reviewers
1. **Delimiter Length:** Currently, there is no limit on the maximum
length of the delimiter string. Let me know if this should be changed.
3. **Localization:** I changed only `Resources/en-US` file.
4. **ViewModel:** In `ProfileViewModel.cpp`, I added the `else if` block
for the new setting, but left it empty because no other UI logic
currently depends on it.
## PR Checklist
- [x] Closes#19565
- [ ] Documentation updated
- [x] Schema updated (if necessary)
### 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
## Summary
The Settings tab color (`SettingsUiTabBrush`) was out of sync with the
Settings page background (`SettingsPageBackground`), causing a visible
mismatch - the tab appeared black while the page was dark gray.
## Changes
Aligned `SettingsUiTabBrush` in `App.xaml` to match
`SettingsPageBackground` from `MainPage.xaml`:
## Validation
- Built and deployed locally as Windows Terminal Dev
- Verified Settings tab and page backgrounds match in Dark and Light
themes
- No impact on other tab colors or theming
Closes#19873
Co-authored-by: Sagar Bhure <sagarbhure@microsoft.com>
## Summary of the Pull Request
Does what it says on the tin. Sets the AUMID to
`WindowsTerminal.<hash>` with a slightly different prefix
based on the branding. The hash is based on the full process image name.
Extracted from #20013
This PR is 90% wiring up OOP interfaces.
Closes#19926
## Validation Steps Performed
* Run `github.com/xtermjs/vtc`
* Observed `UnknownSequence` calls under a debugger
## 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`.
## 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
Avoid translating W32IM sequences to KKP.
Closes#19977
## Validation Steps Performed
* Use French Bepo keyboard layout
* Disable KKP
* Use fish shell
* `AltGr+Y` produces `{` ✅
## 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>
Whoops. `chk` builds are failing because Atlas tries to do hot shader
reload in `DEBUG` builds.
That works in our public repo, but here there is not usually going to be
access to the source code.
Reviewed-by: Leonard Hecker <lhecker@microsoft.com>
We have been looking at a set of conhost crashes due to low-memory
conditions. I've observed that they all happen during the first pass of
rendering, before there's even an engine set up, when we try to estimate
whether there are any blink attributes. I also found that we'll commit
the buffer to check the cursor's double-width status and whether it's on
a double-width-rendition line.
Uncommitted rows _never_ contain a blinker, are never double-width and
never contain DBCS.
We can't necessarily avoid committing an empty buffer _forever,_ but
this at least moves the first commit until after the renderer truly
starts.
This prevents us from committing an empty buffer for headless console
apps (!)
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
## 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
This required the following changes:
- Delayloading ICU in all of our tests, and skipping tests where it
could not be loaded
- Adding a new test group which skips the PolicyTests, which cannot be
run on some editions which have no app platform.
In addition, instead of onboarding new failing test passes, this pull
request finally repairs the broken ConPTY tests (which diverged from the
OSS implementation and had to be re-en-verged)
Closes MSFT-61409507
Reflected from OS PR !15022958
## Summary of the Pull Request
Simplifies the word expansion functions in TextBuffer by removing the
following functions:
- `GetWordStart2()`
- `GetWordEnd2()`
- `MoveToNextWord()`
- `MoveToPreviousWord()`
- `_GetWordStartForAccessibility()`
- `_GetWordStartForSelection()`
- `_GetWordEndForAccessibility()`
- `_GetWordEndForSelection()`
In favor of a simple:
- `GetWordStart()`
- `GetWordEnd()`
- _GetDelimiterClassRunStart()`
- `_GetDelimiterClassRunEnd()`
Tests were used to help ensure a regression doesn't occur. That said,
there were a few modifications there too:
- Removed `MoveByWord` test
- It directly called `MoveToNextWord()` and `MoveToPreviousWord()`,
which no longer exist. These were helper functions for
`UiaTextRangeBase`, and any special logic has been moved into
`_moveEndpointByUnitWord` using the unified
`GetWordStart()`/`GetWordEnd()` APIs.
- The tested behavior is still covered by `MoveToPreviousWord`,
`MovementAtExclusiveEnd`, and the generated word movement tests.
- updated `GetWordBoundaries` tests
- Inclusive --> exclusive end positions for `GetWordEnd()`: The old
`_GetWordEndForSelection()` returned inclusive end positions, whereas
the new `GetWordEnd()` returns exclusive end positions. This is what
`GetWordEnd2()` already used, so every old expected value shifted +1 in
the x direction (or to {RightExclusive, y} at row boundaries) to account
for that.
- `ControlChar` wrap-crossing behavior: The old
`_GetWordStartForSelection()` had a special check at the left boundary
that prevented whitespace runs from crossing wrapped row boundaries. The
new `_GetDelimiterClassRunStart()` doesn't have this special case (it
treats ControlChar the same as other delimiter classes when the row was
wrap-forced). This changed one test case: `GetWordStart({1, 4})` in
selection mode went from `{0, 4}` to `{6, 3}` (the whitespace run now
crosses the wrap boundary to row 3). This matches the behavior
TerminalSelection was already getting from `GetWordStart2()`.
## Validation Steps Performed
Tests passed:
✅ Conhost.Interactivity.Win32.Unit.Tests.dll
✅ UnitTests_TerminalCore\Terminal.Core.Unit.Tests.dll
Word navigation feels good for...
✅ Narrator
✅ NVDA
✅ Mouse selection
✅ Mark mode
Closes#4423
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
With the rendering thread changes in #18632 and #19330, we strengthened
a requirement that render shutdown be done outside of the console lock.
This works on all platforms except OneCore, where ConIoSrv manages the
focus of multiple console windows and we need to explicitly order the
handling of tearing down and relinquishing device resources.
The old code (before #18632) used to wait for a whole second before
giving up.
Instead, let's just unlock the console to let the final frame drain out.
I created a synthetic repro: start two cmd sessions with a lot of
rendering load (`cmdd start cmd /c dir /s c:\`), and then run `cmdd date
/t` in a tight loop while tabbing between the console windows.
Before this fix, it hangs within a couple tens of date invocations. With
this fix, it does not hang at all.
Fixes MSFT-61354695
An internal AI correctly flagged that we aren't calling
`UnadviseSink()` in case a later `Initialize()` call fails.
We can easily fix this by calling `Uninitialize()`.
## 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
## 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
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
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>
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)
This also moves the Ukrainian Preview release notes to Stable (which
wouldn't happen automatically) and updates them thanks to Serhii.
Co-authored-by: Serhii Pustovit <light.feel@gmail.com>
When a new command is added or an existing command's name is changed,
make sure we update the top-level command list so that it appears there
when the user navigates back to the actions page
## Detailed Description of the Pull Request / Additional comments
Added a new `_CommandListDirty` flag to the `ActionsViewModel`. When a
new command is added or a command's name is changed the flag is set.
When navigating to the top-level actions page, we regenerate the
`_CommandList` if the flag is set.
## Validation Steps Performed
Adding a new command or updating a command's name is now reflected
correctly when navigating back to the actions page.
This only gates VT-driven clipboard writes (OSC 52), not
user-initiated copy.
Closes#19051
Co-authored-by: Leonard Hecker <lhecker@microsoft.com>
Co-authored-by: Dustin L. Howett <dustin@howett.net>
This PR introduces `compatibility.ambiguousWidth` as a **global**
compatibility setting (`narrow` default, `wide` optional).
The default remains `narrow`.
Why global-only in this PR:
- Width detection is currently process-wide (`CodepointWidthDetector`
singleton).
- True profile-level ambiguous-width behavior would require broader
architectural changes and is intentionally deferred to a follow-up
design/PR.
What this PR guarantees:
- Terminal-side handling is consistent end-to-end for the selected
ambiguous-width policy (rendering path + ConPTY/host propagation).
Known limitation:
- Some client applications (for example PSReadLine/readline-based apps)
may still compute character widths independently.
- In such cases, cursor movement or Backspace behavior can differ from
visual cell width even when terminal-side policy is consistent.
This is a compatibility/readability trade-off feature:
- `narrow`: prioritize cross-application compatibility.
- `wide`: prioritize readability with many CJK fonts.
Closes#153Closes#370
Refs #2928
Refs #2049, #2066, #2375, #900, #5910, #5914
Co-authored-by: Leonard Hecker <lhecker@microsoft.com>
## Summary of the Pull Request
Fixes a bug where a partially visible URL would not be detected. This is
fixed by expanding the search space by 1 viewport height in both
directions.
The `_patternIntervalTree` now operates in the absolute-buffer space as
opposed to the viewport-relative space. It's a bit of an annoying
change, but the alternative would be to keep track of the offset used by
the method above, which I find more annoying, personally. As a part of
this change, I made it a bit more clear when something is
viewport-relative vs buffer-absolute.
Regarding mark mode hyperlink navigation, now that everything is in the
absolute-buffer space, I'm able to fix some of the issues in #13854. I
removed `_selectionIsTargetingUrl` and fixed/validated navigating to
hyperlinks that are partially visible.
## Validation Steps Performed
Detects URL that is...
✅ fully visible
✅ partially cropped off the top
✅ partially cropped off the bottom
✅ Above scenarios work with mark mode hyperlink navigation
✅Tests added
Closes#18177Closes#13854
## Summary
Fixes tab row losing acrylic material when window is unfocused, even
when "Allow acrylic material in unfocused windows" is enabled.
## References
Fixes#19544
## Changes
Modified `_updateThemeColors()` in `TerminalPage.cpp` to check both
window focus state and `EnableUnfocusedAcrylic` setting.
## Testing
- Verified acrylic persists when window loses focus (with setting
enabled)
- Verified acrylic removed when setting disabled (expected behavior)
---------
Co-authored-by: Carlos Zamora <carlos.zamora@microsoft.com>
This pull request resolves a longstanding issue (which probably nobody
but me cared about :P) where gridlines and underlines did not change
color to match the selection or search highlight foreground.
During brush preparation, we stash the underline color; during line
rendering we store it in a third bitmap and during rendering in each
backend we read the colors out of the appropriate bitmap.
The gridlines come from the foreground bitmap and the underlines from
the new underline bitmap.
I've updated each instance of append*Line to break the line-to-render up
by color span.
We are, therefore, no longer passing the stroke color in each gridline
payload.
The original console renderer supports painting the gridlines in
different colors for each half of a 2-cell glyph. That functionality no
longer works in Atlas. To fix it, we would need to move underline _span_
preparation into PaintBufferLine (so that we could apply the right
colors to the bitmap mid-cell.)
Known Issues
------------
- D2D only; dotted lines which are broken by a highlight have doubled
dots (because we draw them as individual line segments and without a
global geometry like curly lines.)
- Atlas (all); grid line colors can no longer change in the middle of
a 2-cell glyph.
Tested By
---------
RenderingTests