Repository navigation
Note editor: a double click selects the word, a triple the paragraph - #1681
Merged
Merged
Conversation
The word is the code editor's: one class function in text, used by the buffer's steps and by text::word_around.
4 tasks
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.
Closes #1673
Reproduced on
dev/1.2.2by the new kittest: a double click onworldin « hello world » only places the caret; typingtheregiveshello wothererld.Change
_; a run of punctuation; spaces) are now one function intext, used by the code editor's steps by word and by the newtext::word_around. The rich editor calls it on the leaf's text.déjà-vucould never be taken alone. Past the end of a line, the line's last word.Tests
text/src/words.rs: the runs ofdéjà-vu,foo_bar,a.b, spaces, emoji, a line end, an empty text, past the end.notes/overlays/editor/rich/tests.rs: a double click onworldthen typing replaces the word; a triple click replaces the paragraph; Shift and a double click stretch the selection. The first fails ondev/1.2.2. kittest gives each release a frame of a quarter of a second, so the bench stretches egui's delay between clicks for these gestures.03_editing_a_note: a double click on a Note's first word, typed over, the body read. egui counts a click less than 0.3 s before a double click into a triple: the step lets the field's search pause pass twice and opens the card by the keys, with no wait on a duration. New driver calldouble_click_in, both clicks in one batch however slowly the window paints. Run twice on a hidden desktop: passed.cargo test -p ui --lib(989 passed),cargo test -p text.🤖 Generated with Claude Code