Mouse text selection has unexpected behavior in terminal #850

Open
opened 2026-02-16 17:28:34 -05:00 by yindo · 3 comments
Owner

Originally created by @pepperpepperpepper on GitHub (Jul 22, 2025).

Originally assigned to: @adamdotdevin on GitHub.

Thanks for this amazing project.

Mouse text selection has these issues:

• Can't select text beyond viewport (no scrolling while selecting)
• Selection immediately copies to clipboard on release
• Mouse coordinates don't account for scroll position

These behaviors differ from standard terminal applications like vim, tmux, and less.

Fixed in https://github.com/sst/opencode/pull/1209

Originally created by @pepperpepperpepper on GitHub (Jul 22, 2025). Originally assigned to: @adamdotdevin on GitHub. Thanks for this amazing project. Mouse text selection has these issues: • Can't select text beyond viewport (no scrolling while selecting) • Selection immediately copies to clipboard on release • Mouse coordinates don't account for scroll position These behaviors differ from standard terminal applications like vim, tmux, and less. Fixed in https://github.com/sst/opencode/pull/1209
Author
Owner

@Pivert commented on GitHub (Aug 5, 2025):

Indeed, this copy on release completely breaks the standard select to copy mode in terminals.
This is a total pain when using opencode from docker, since copy on select is the only option, and there's not clip board.

We should be able to:

  • Disable clipboard completely (when there are no clipboard/xclip...)
  • (possibly) use the tmux clipboard.

Thanks for this great tool.

@Pivert commented on GitHub (Aug 5, 2025): Indeed, this copy on release completely breaks the standard select to copy mode in terminals. This is a total pain when using opencode from docker, since copy on select is the only option, and there's not clip board. We should be able to: - Disable clipboard completely (when there are no clipboard/xclip...) - (possibly) use the tmux clipboard. Thanks for this great tool.
Author
Owner

@smolin commented on GitHub (Nov 4, 2025):

Just came here to agree: copy and paste operations should use standard system paradigm: click-drag to select a region, double-click to select a word, triple-click to select a line; control-C or command-C to copy to system clipboard. It's a slight but very real cognitive load issue.

Thanks for this great project, it rocks!

@smolin commented on GitHub (Nov 4, 2025): Just came here to agree: copy and paste operations should use standard system paradigm: click-drag to select a region, double-click to select a word, triple-click to select a line; control-C or command-C to copy to system clipboard. It's a slight but very real cognitive load issue. Thanks for this great project, it rocks!
Author
Owner

@kommander commented on GitHub (Dec 20, 2025):

This should be improved in the latest version. It still copies on mouse release, but that will change soon. In the textarea you can however select text with shift+arrow keys.

@kommander commented on GitHub (Dec 20, 2025): This should be improved in the latest version. It still copies on mouse release, but that will change soon. In the textarea you can however select text with shift+arrow keys.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#850