Skip to content

clear previous selection on focus change#18

Open
databasedav wants to merge 1 commit into
ickshonpe:masterfrom
databasedav:unselect_focus_change
Open

clear previous selection on focus change#18
databasedav wants to merge 1 commit into
ickshonpe:masterfrom
databasedav:unselect_focus_change

Conversation

@databasedav

@databasedav databasedav commented Jun 10, 2025

Copy link
Copy Markdown
Contributor

just bringing back the selection clearing behavior i introduced here #2 which got removed at some point (was that intentional?), ported to using the action queue with a new TextInputEdit::SetSelection variant

tested using the multiple inputs example

also ran cargo fmt and fixed a clippy issue

@ickshonpe

Copy link
Copy Markdown
Owner

Yes it was deliberate/ I don't have a strong opinion either way but most text inputs and editors seem to preserve the previous selection when switching focus. Maybe it could be a configurable behaviour.

@databasedav

databasedav commented Jun 10, 2025

Copy link
Copy Markdown
Contributor Author

o interesting, i suppose our samples are just different, vscode and discord don't (as far i can tell, on ubuntu for context) for example, but totally fair

i will still need the new TextInputEdit::SetSelection variant though if we want to move in the direction of not having to operate on the underlying Editor directly, but i'm fine with whatever :)

@databasedav

Copy link
Copy Markdown
Contributor Author

just realized that vscode has both behaviors, for the search inputs, previous selections are cleared, but for selections in different file windows, the selection background is maintained for previous selections, but with a different color

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.

2 participants