close
Skip to content

Avoid scrolling when the search is open#19775

Merged
DHowett merged 2 commits into
mainfrom
dev/lhecker/19754-search-scroll
Jan 24, 2026
Merged

Avoid scrolling when the search is open#19775
DHowett merged 2 commits into
mainfrom
dev/lhecker/19754-search-scroll

Conversation

@lhecker
Copy link
Copy Markdown
Member

@lhecker lhecker commented Jan 23, 2026

When text scrolls in and out of view, depending on the length
of the scrollback and latency of input, GetSearchHighlightFocused
would change which would trigger a ScrollToSearchHighlight call.

This PR changes the behavior such that only actively changing the
search mask triggers a search (typing text or pressing enter).

Closes #19754

Validation Steps Performed

  • Brining text in and out of view doesn't scroll ✅
  • Toggling the aA button scrolls results into view ✅

@DHowett
Copy link
Copy Markdown
Member

DHowett commented Jan 24, 2026

This PR changes the behavior such that only actively changing the search mask triggers a search (typing text or pressing enter).

OK, I tested this out. It doesn't prevent the highlighting of newly-found results, only the action where we jump TO a result.

@DHowett DHowett merged commit 71409f8 into main Jan 24, 2026
20 checks passed
@DHowett DHowett deleted the dev/lhecker/19754-search-scroll branch January 24, 2026 00:33
@DHowett DHowett moved this from To Cherry Pick to Cherry Picked in 1.24 Servicing Pipeline Feb 27, 2026
DHowett pushed a commit that referenced this pull request Feb 27, 2026
When text scrolls in and out of view, depending on the length
of the scrollback and latency of input, `GetSearchHighlightFocused`
would change which would trigger a `ScrollToSearchHighlight` call.

This PR changes the behavior such that only actively changing the
search mask triggers a search (typing text or pressing enter).

Closes #19754

## Validation Steps Performed
* Brining text in and out of view doesn't scroll ✅
* Toggling the aA button scrolls results into view ✅

(cherry picked from commit 71409f8)
Service-Card-Id: PVTI_lADOAF3p4s4BBcTlzgkLCdk
Service-Version: 1.24
@DHowett DHowett moved this from Cherry Picked to Shipped in 1.24 Servicing Pipeline Feb 27, 2026
@lhecker lhecker added Area-TerminalControl Issues pertaining to the terminal control (input, selection, keybindings, mouse interaction, etc.) Issue-Bug It either shouldn't be doing this or needs an investigation. Needs-Tag-Fix Doesn't match tag requirements Priority-2 A description (P2) Product-Terminal The new Windows Terminal. and removed Needs-Tag-Fix Doesn't match tag requirements labels May 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area-TerminalControl Issues pertaining to the terminal control (input, selection, keybindings, mouse interaction, etc.) Issue-Bug It either shouldn't be doing this or needs an investigation. Priority-2 A description (P2) Product-Terminal The new Windows Terminal.

Projects

Development

Successfully merging this pull request may close these issues.

Generating new output when the search box is open moves the scroll position

2 participants