Skip to content
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

Add support for uosc menu search #19

Merged
merged 1 commit into from
Oct 26, 2023
Merged

Conversation

christoph-heinrich
Copy link
Contributor

Already works pretty well for being so simple.
Even works with #13.

A search_debounce of 0 probably doesn't make sense when deletion checking is turned on, but without it's fast enough for that.

Is the script message name fine or do you have an idea for something more general?

@christoph-heinrich
Copy link
Contributor Author

christoph-heinrich commented Sep 28, 2023

Please explain why 7c76413 was necessary, because I've noticed that while searching, when I'm typing too fast it doesn't always search for the whole string.
At first I though that the events don't arrive in the correct order, but after checking the mpv code and debugging this it turns out to be the fault of event_loop_exhausted.

I've tried never setting event_loop_exhausted=true and it seems to work fine and search events don't get dropped anymore.

Is it the race condition you described in #13 (comment)?

@po5
Copy link
Owner

po5 commented Sep 28, 2023

Yeah we must know the real menu state and avoid issues like someone repeatedly activating the "next page" item while we're trying to fetch stuff. This ensures that when there are queued up events we only process the first one.
I guess search could be made to bypass this check, or it could be debounced.

@christoph-heinrich
Copy link
Contributor Author

memo-next/memo-prev are the only ones where ignoring events makes sense imo.
I'll implement your suggestions from tomasklaen/uosc#587 (comment) so that this restriction can lifted from other events.

@po5
Copy link
Owner

po5 commented Oct 26, 2023

God that's clean! Thank you.

@po5 po5 merged commit 218234e into po5:master Oct 26, 2023
@christoph-heinrich christoph-heinrich deleted the uosc_search branch October 26, 2023 00:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants