From f1dc25a7741ebec630a09eaf7c7c3c91947f5078 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bla=C5=BE=20Hrastnik?= Date: Wed, 19 May 2021 00:37:01 +0900 Subject: [PATCH] Support count for indent too --- helix-term/src/commands.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/helix-term/src/commands.rs b/helix-term/src/commands.rs index 07e57cf4..e5b57263 100644 --- a/helix-term/src/commands.rs +++ b/helix-term/src/commands.rs @@ -1855,11 +1855,12 @@ fn get_lines(doc: &Document, view_id: ViewId) -> Vec { } pub fn indent(cx: &mut Context) { + let count = cx.count; let (view, doc) = cx.current(); let lines = get_lines(doc, view.id); // Indent by one level - let indent = Tendril::from(doc.indent_unit()); + let indent = Tendril::from(doc.indent_unit().repeat(count)); let transaction = Transaction::change( doc.text(),