You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Text selection stops working after copy-on-select triggers #14420
After selecting text by click-dragging (copy-on-select mode on Linux/macOS), the text is copied and the toast notification shows correctly. However, immediately trying to select more text often fails -- the selection doesn't start. You have to wait a bit before text selection works again.
The root cause is in Selection.copy() (selection.ts): it calls renderer.clearSelection() synchronously inside the onMouseUp handler, which runs during @opentui's processMouseEvent event bubbling -- before finishSelection() gets to execute. This nullifies currentSelection before the renderer can properly complete its selection lifecycle (setting isDragging=false, emitting the selection event), leaving stale internal state that blocks subsequent selections.
Plugins
None
OpenCode version
latest (dev)
Steps to reproduce
Open OpenCode TUI on Linux or macOS (copy-on-select is enabled by default)
Click-drag to select some text -- it copies and shows "Copied to clipboard" toast
Immediately try to click-drag to select more text
The selection often doesn't start on the first attempt
sometimes double clicking "esc" and then trying to select works, but it doesn't always work
Have noticed it, honestly the copy is a bit all over the place, often in bigger sessions it wont work at all i have experienced
Activity
nionis commentedon Mar 4, 2026
sometimes double clicking "esc" and then trying to select works, but it doesn't always work
EliasHanken commentedon Mar 5, 2026
github-actions commentedon May 5, 2026
To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.
richardokonicha commentedon Oct 4, 2026
any update on this issue its a great pain