on master help sign in
Support count for indent too
commitf1dc25a7741ebec630a09eaf7c7c3c91947f5078 authorBlaž Hrastnik <blaz@mxxn.io> dateWed 19 May 2021, 00:37 (5 years ago) parent4f335fa
1 file changed+2−1
helix-term/src/commands.rs+2−1
helix-term/src/commands.rs+2−1
@@ -1855,11 +1855,12 @@ fn get_lines(doc: &Document, view_id: ViewId) -> Vec<usize> {
18551855}
18561856
18571857pub fn indent(cx: &mut Context) {
1858+ let count = cx.count;
18581859 let (view, doc) = cx.current();
18591860 let lines = get_lines(doc, view.id);
18601861
18611862 // Indent by one level
1862− let indent = Tendril::from(doc.indent_unit());
1863+ let indent = Tendril::from(doc.indent_unit().repeat(count));
18631864
18641865 let transaction = Transaction::change(
18651866 doc.text(),