Skip to content

turbopack-240730.1

@chris-olszewski chris-olszewski tagged this 29 Jul 21:58
### Description

Adds mouse selection and copying in the terminal pane. When selecting
text, pressing `c` will copy the current text. Users are allowed to
interact with tasks while having a selection, but `c` will still be
intercepted to copy the selection.

Future work:
 - Double click should select the entire line

Reviewer Guide:
 - Review each commit on it's own
- We implement selection at the virtual terminal level, this allows us
to take into account the current scroll state and translate mouse events
into "absolute" position.
- I did a bad thing and fixed some bugs in this PR. They have their own
commits, but easier to do here as they would cause merge conflicts if
done independently.


### Testing Instructions

Added unit tests for the vt100 level copying. Testing this in actual
terminals is the best way to test mouse inputs feel right.

Video: (please ignore my struggles scrolling and accurately selecting
text, I'm on a trackpad and it's very humid)


https://github.com/user-attachments/assets/bda72f3b-dc8c-4344-972a-cfc0ac65c217
Assets 2
Loading