Skip to main content

shift_click_range

Function shift_click_range 

Source
pub fn shift_click_range(anchor: Option<usize>, clicked: usize) -> Vec<usize>
Expand description

Compute a shift-click range selection.

Compute a shift-click range selection.

Given an optional anchor index (from the last non-shift click) and the currently clicked index, returns an ascending Vec<usize> covering [min(anchor, clicked)..=max(anchor, clicked)]. If anchor is None the clicked index is used as both endpoints, yielding a single-element vec.

This is GUI-only logic — the TUI uses ascending_range directly with its own keyboard-driven anchor handling.