Skip to content

feat(find): match case and whole words in the find bar - #182

Merged
anderix merged 2 commits into
mainfrom
178-find-options
Nov 23, 2026
Merged

anderix merged 2 commits into
mainfrom
178-find-options

Conversation

@anderix

@anderix anderix commented Nov 23, 2026

Copy link
Copy Markdown
Member

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-segmentation was 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_query covers it.

German follows LibreOffice: "Groß-/Kleinschreibung beachten" and "Nur ganze Wörter".

Closes #178

@anderix

anderix commented Nov 23, 2026

Copy link
Copy Markdown
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; alt_c_types_nothing_whatever_character_the_layout_gives_it covers it. Nothing declined.

@anderix
anderix merged commit 8880521 into main Nov 23, 2026
@anderix
anderix deleted the 178-find-options branch November 23, 2026 23:54
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.

Find: match case and whole words

1 participant