Skip to main content

cut_vim_range

Function cut_vim_range 

Source
pub fn cut_vim_range<H: Host>(
    ed: &mut Editor<View, H>,
    start: (usize, usize),
    end: (usize, usize),
    kind: RangeKind,
) -> String
Expand description

Cut a vim-shaped range through the View edit funnel and return the deleted text. Translates vim’s RangeKind (Linewise/Inclusive/Exclusive) into the buffer’s hjkl_buffer::MotionKind (Line/Char) and applies the right end- position adjustment so inclusive motions actually include the bot cell. Pushes the cut text into the clipboard via record_yank_to_host and the textarea yank buffer (still observed by p/P until the paste path is ported), and updates yank_linewise for linewise cuts.