Skip to content

Alt+drag for column / block (horizontal) selection #159

Description

@bastien-gallay

What

Holding Alt/Option while drag-selecting should produce a rectangular
(column/block)
selection instead of the linear full-width one.

Current state

Selection is always linear: selection_span() produces full-width spans for
intermediate rows (crates/app/src/shell/terminal.rs:431-442), and
selection_text() mirrors that (terminal.rs:445-464). There is no block/
rectangular flag on TermState.

Fix direction

  • Add a block: bool (or a mode enum) to TermState, set while Alt is held at
    drag start.
  • Branch both selection_span (overlay geometry) and selection_text (copied
    text) on the flag to clip each row to the anchor/head column range.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Normal — laterenhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions