From f1dc25a7741ebec630a09eaf7c7c3c91947f5078 Mon Sep 17 00:00:00 2001 From: Blaž Hrastnik Date: Wed, 19 May 2021 00:37:01 +0900 Subject: Support count for indent too --- helix-term/src/commands.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'helix-term/src') 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(), -- cgit v1.2.3-70-g09d2