Skip to content

Adding has_selection helper to TextInputBuffer#41

Open
recatek wants to merge 1 commit into
ickshonpe:masterfrom
recatek:has_selection
Open

Adding has_selection helper to TextInputBuffer#41
recatek wants to merge 1 commit into
ickshonpe:masterfrom
recatek:has_selection

Conversation

@recatek

@recatek recatek commented Nov 5, 2025

Copy link
Copy Markdown

It's handy to be able to be able to check if a TextInputBuffer has a current selection without having to pull in cosmic_text yourself and go through the editor.

My use case is that I'm writing a custom debug console and want to be able to press Esc to quickly clear the input, unless I have something selected, in which case I want Esc to deselect as normal first.

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