pub fn slice_cols(s: &str, start_col: usize, max_cols: usize) -> StringExpand description
Slice s starting at display column start_col, taking up to max_cols
columns. Characters that straddle the start boundary are skipped. Used to
implement horizontal scroll in the input prompt — keeps the cursor visible
when the buffer exceeds the viewport width.