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

Improve selection behaviour on focus change #1283

Merged
merged 1 commit into from
Oct 19, 2020
Merged

Conversation

cmyr
Copy link
Member

@cmyr cmyr commented Oct 5, 2020

On windows, we persist the existing selection when focus
changes. On mac, the behaviour depends on whether or not there
was a click. If there was a click, we use the click to determine
the selection; otherwise we select the whole buffer.

In addition, on mac, we no longer draw the cursor if the selection
is not a caret.

@cmyr cmyr added the S-blocked waits for another PR or dependency label Oct 5, 2020
@cmyr cmyr force-pushed the text-editor branch 3 times, most recently from 61a2c62 to 8aa9f9a Compare October 7, 2020 18:36
Base automatically changed from text-editor to master October 7, 2020 19:05
@cmyr cmyr added S-needs-review waits for review and removed S-blocked waits for another PR or dependency labels Oct 7, 2020
Copy link
Collaborator

@totsteps totsteps left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested on macOS and Linux. LGTM.

@cmyr
Copy link
Member Author

cmyr commented Oct 15, 2020

oops! note to self: I need a changelog for this.

@luleyleo luleyleo added S-waiting-on-author waits for changes from the submitter and removed S-needs-review waits for review labels Oct 17, 2020
On windows, we persist the existing selection when focus
changes. On mac, the behaviour depends on whether or not there
was a click. If there was a click, we use the click to determine
the selection; otherwise we select the whole buffer.

In addition, on mac, we no longer draw the cursor if the selection
is not a caret.

- fixes #1225 (again)

Update druid/src/widget/textbox.rs

Co-authored-by: Leopold Luley <git@leopoldluley.de>
@cmyr cmyr merged commit c5df2cb into master Oct 19, 2020
@cmyr cmyr deleted the focus-changed-selection branch October 19, 2020 18:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-author waits for changes from the submitter
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants