terminal
terminal copied to clipboard
Fix search constantly triggering a scroll
This addresses a review comment left by tusharsnx in #17092 which I
forgot to fix before merging the PR. The fix itself is somewhat simple:
Terminal::SetSearchHighlightFocused triggers a scroll if the target
is outside of the current (scrolled) viewport and avoiding the call
unless necessary fixes it. To do it properly though, I've split up
Search::ResetIfStale into IsStale and Reset. Now we can properly
detect staleness in advance and branch out the search reset cleanly.
Additionally, I've taken the liberty to replace the IVector in
SearchResultRows with a direct const std::vector& into Searcher.
This removes a bunch of code and makes it faster to boot.
Validation Steps Performed
- Print lots of text
- Search a common letter
- Scroll up
- Doesn't scroll back down ✅
- Hold enter to search more occurrences scrolls up as needed ✅
showMarksOnScrollbarstill works ✅
the build is highly imploded, so I may not review it yet ;P
/azp run
Azure Pipelines successfully started running 1 pipeline(s).