-
Notifications
You must be signed in to change notification settings - Fork 8.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix some search highlights scenarios #17352
Fix some search highlights scenarios #17352
Conversation
// Stop ongoing close animation if any | ||
if (CloseAnimation().GetCurrentState() == Media::Animation::ClockState::Active) | ||
{ | ||
CloseAnimation().Stop(); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure I understand how us previously ignoring the animation state would result in
Fast closing and re-opening SearchBox would leave search highlights in an inconsistent state.
If you know why, could you explain how that happens?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When searchbox is in focus, if you press ESC and then quickly do a "find next/prev match" action, it will trigger this issue. The trick is to start a search when SB is closing. It's easier if you bind Find match action to a single key, eg. F3
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not to forget, highlights should be active (i.e. one or more search results available) when you're closing SB.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for doing this! Sorry it took us a while to get to it 😅
Fixes: - Snapping the current match to the current selection doesn't work. - Fast closing and re-opening SearchBox would leave search highlights in an inconsistent state. The highlights would be active even when SB is not on the screen, and results are not updated as more text is added to the buffer. - Search highlights scroll marks are not cleared when the search box is closed. (cherry picked from commit 7c1e229) Service-Card-Id: 92736967 Service-Version: 1.21
Fixes: