When the user drags a text selection and the cursor reaches within 40px
of the top or bottom edge of the terminal, the viewport auto-scrolls at
a speed proportional to the distance from the edge (up to 8 px/frame).
The selection head extends as the view scrolls, enabling cross-page
selection without manually scrolling first.
- Add start_autoscroll / stop_autoscroll helpers using setInterval (~60fps)
- Detect edge proximity in handle_mousemove after updating selection head
- Stop auto-scroll on mouseup or when cursor leaves edge zone
- Switch view_mode to History/Live based on scroll position