[FEATURE] Let a plugin pane opt out of mouse selection (and copy on select) in the fullscreen TUI
Problem
In the fullscreen TUI on Linux (v2.1.296), dragging the mouse over a plugin pane selects its text, and double-click selects a word. With copy on select enabled, the selected text is copied to the clipboard right away.
For a pane used as a control panel (buttons, shortcuts, status), this is unwanted: clicking and moving the mouse over a button starts a selection and overwrites the clipboard with text the user never meant to copy.
As far as I can tell, a plugin cannot prevent this. The elements a pane can draw (Box, Text, ...) have no prop to make their text non-selectable, and the copy-on-select path does not raise the ui.copy event (see #99758), so a hook cannot refuse it either.
Proposed solution
A prop on Pane (and/or on Box/Text), for example selectable={false}, so that mouse drag and double-click inside it do not start a selection and nothing is copied. This is the equivalent of CSS user-select: none.
Related
- #99758: copy on select does not raise
ui.copy - #100645: the opposite request for the desktop app (make pane text selectable)
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗