From c0d32707d03d71434c290e18d6db18b3b2de3875 Mon Sep 17 00:00:00 2001 From: Robin van Dijk Date: Thu, 10 Jun 2021 13:10:05 +0200 Subject: [PATCH] move to first nonwhitespace on shift-i This matches the behaviour in vim and kak --- helix-term/src/commands.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/helix-term/src/commands.rs b/helix-term/src/commands.rs index 3358f9d20..d8c56f4e1 100644 --- a/helix-term/src/commands.rs +++ b/helix-term/src/commands.rs @@ -1189,9 +1189,9 @@ pub fn buffer_picker(cx: &mut Context) { cx.push_layer(Box::new(picker)); } -// I inserts at the start of each line with a selection +// I inserts at the first nonwhitespace character of each line with a selection pub fn prepend_to_line(cx: &mut Context) { - move_line_start(cx); + move_first_nonwhitespace(cx); let doc = cx.doc(); enter_insert_mode(doc); }