Repository navigation
feat(find): match case and whole words in the find bar - #182
Merged
Merged
Conversation
Member
Author
|
Review: one finding, fixed in the second commit. The Alt shortcuts now drop every text event in the frame they are taken, so Option+C on a Mac ("ç") or Alt+C on a Cyrillic layout types nothing; |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Find gets two toggles, Aa (Match case) and W (Whole words), also reached with Alt+C and Alt+W while the bar has the keyboard. They hold for the window's life, apply in all three applications, and Replace follows them, since it replaces the matches Find holds.
Whole words means a match neither starts nor ends inside a word, by the Unicode word boundaries (UAX #29) egui's caret moves by. The boundaries come from the new
odox_core::words::word_ranges, which the word count and spell checking will also use;unicode-segmentationwas already in the lock through egui and is pure Rust.Alt plus a letter also arrives as the letter typed, so the bar drops that text event when it takes the shortcut. Without that, Alt+W toggled the option and typed "w" into the query;
alt_w_toggles_whole_words_without_typing_into_the_querycovers it.German follows LibreOffice: "Groß-/Kleinschreibung beachten" and "Nur ganze Wörter".
Closes #178