-
Notifications
You must be signed in to change notification settings - Fork 8.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Avoid moving the selection while typing a search query (#15998)
This commit fixes 2 issues: * `ControlCore::ScrollMarks()` would call `ResetIfStale` again while the search prompt hasn't changed. This has been fixed by using `_cachedSearchResultRows` as the indicator for whether it needs to be recreated or not. * While typing a search query, the selection would move among the results with each typed character, because `MovePastCurrentSelection` would do what its name indicates. It has been renamed and rewritten to be `MoveToCurrentSelection`. To avoid breaking UIA, the previous `MovePastPoint` implementation was kept. Since the new `MoveToCurrentSelection` function would not move past the current selection anymore, changing the direction would not move past the current result either. To fix this, we now don't invalidate the search cache when changing the direction. Closes #15954 ## Validation Steps Performed * Run ``"helloworld`n"*20`` in pwsh * Search for "helloworld" * While typing the characters the selection doesn't move ✅ * ...nor when searching downwards ✅ * ...nor when erasing parts of it ✅ * ...and it behaves identical in conhost ✅
- Loading branch information
Showing
4 changed files
with
55 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters