-
Notifications
You must be signed in to change notification settings - Fork 10.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
Made the list of exercises searchable, ref #2093 #2098
Conversation
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.
Very good implementation so far. Only small changes are required :)
…rch_query to apply_search_query
} | ||
None => { | ||
let msg = String::from(" (not found)"); | ||
self.message.push_str(&msg); |
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.
No need to create a String
here (it allocates). .push_str(" (not found)")
is enough.
match curr_key { | ||
KeyCode::Esc | KeyCode::Enter => { | ||
is_searching = false; | ||
list_state.search_query.clear(); |
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.
We probably need to draw here to remove the search query. I will test it.
I will take care of the two comments myself. Merging for now. Very well implemented. Thank you! :D |
I made the final touches in da8b3d1, mostly subjective changes :) |
No description provided.