Improve selection behaviour on focus change#1283
Merged
Conversation
d9b6511 to
c8ef792
Compare
61a2c62 to
8aa9f9a
Compare
c8ef792 to
27729cf
Compare
totsteps
approved these changes
Oct 14, 2020
Collaborator
totsteps
left a comment
There was a problem hiding this comment.
Tested on macOS and Linux. LGTM.
Member
Author
|
oops! note to self: I need a changelog for this. |
luleyleo
reviewed
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>
91afd4b to
ec048ab
Compare
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.
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.