opencode icon indicating copy to clipboard operation
opencode copied to clipboard

Mouse text selection has unexpected behavior in terminal

Open pepperpepperpepper opened this issue 4 months ago • 2 comments

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

pepperpepperpepper avatar Jul 22 '25 05:07 pepperpepperpepper

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 avatar Aug 05 '25 16:08 Pivert

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 avatar Nov 04 '25 17:11 smolin