Commit Graph

1 Commits

  • feat(tui2): add multi-click transcript selection (#8471)
    Support multi-click transcript selection using transcript/viewport
    coordinates
    (wrapped visual line index + content column), not terminal buffer
    positions.
    
    Gestures:
    - double click: select word-ish token under cursor
    - triple click: select entire wrapped line
    - quad click: select paragraph (contiguous non-empty wrapped lines)
    - quint+ click: select the entire history cell (all wrapped lines
    belonging to a
      single `HistoryCell`, including blank lines inside the cell)
    
    Selection expansion rebuilds the wrapped transcript view from
    `HistoryCell::display_lines(width)` so boundaries match on-screen
    wrapping during
    scroll/resize/streaming reflow. Click grouping is resilient to minor
    drag jitter
    (some terminals emit tiny Drag events during clicks) and becomes more
    tolerant as
    the sequence progresses so quad/quint clicks are practical.
    
    Tests cover expansion (word/line/paragraph/cell), sequence resets
    (timing, motion,
    line changes, real drags), drag jitter, and behavior on spacer lines
    between
    history cells (paragraph/cell selection prefers the cell above).