diff --git a/helix-core/src/commands.rs b/helix-core/src/commands.rs index 914ca0fe1..2c420b6ec 100644 --- a/helix-core/src/commands.rs +++ b/helix-core/src/commands.rs @@ -80,9 +80,8 @@ pub fn prepend_to_line(state: &mut State, _count: usize) { let positions: Vec<_> = lines .into_iter() .map(|index| { - // adjust all positions to the end of the line. - let line_start = state.doc.line_to_char(index); - line_start + // adjust all positions to the start of the line. + state.doc.line_to_char(index) }) .collect();