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

Fix word selection logic #1665

Merged
merged 1 commit into from
Mar 19, 2021
Merged

Fix word selection logic #1665

merged 1 commit into from
Mar 19, 2021

Conversation

cmyr
Copy link
Member

@cmyr cmyr commented Mar 18, 2021

This is particularly relevant for when the user double-clicks a word.
Previously if the click fell on a word boundary we would not
recognize that; now if the click falls on a word boundary we will
treat that as the start of the new selection range.

In addition, word select now selects anything between two word
boundaries; we do not care if it is actually a word. As an example:
if the user double clicks in whitespcae, we will select any
contiguous whitespace.

progress on #1652

This will conflict with #1653, so I should maybe start merging some of these.

@cmyr cmyr force-pushed the better-word-select branch from 076bb04 to 5b2d893 Compare March 19, 2021 01:38
This is particularly relevant for when the user double-clicks a word.
Previously if the click fell on a word boundary we would not
recognize that; now if the click falls on a word boundary we will
treat that as the start of the new selection range.

In addition, word select now selects *anything* between two word
boundaries; we do not care if it is actually a word. As an example:
if the user double clicks in whitespcae, we will select any
contiguous whitespace.

progress on #1652
@cmyr cmyr force-pushed the better-word-select branch from 5b2d893 to 42672bc Compare March 19, 2021 13:23
@cmyr
Copy link
Member Author

cmyr commented Mar 19, 2021

I'm going to merge this because I have another patch that will heavily conflict. If there are any problems in the logic here I'm sure we'll hear about them. 😅

@cmyr cmyr merged commit 39f4855 into master Mar 19, 2021
@cmyr cmyr deleted the better-word-select branch March 19, 2021 14:32
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.

1 participant