diff options
author | Blaž Hrastnik | 2021-05-18 15:37:01 +0000 |
---|---|---|
committer | Blaž Hrastnik | 2021-05-18 15:37:01 +0000 |
commit | f1dc25a7741ebec630a09eaf7c7c3c91947f5078 (patch) | |
tree | 70b1e4f9015c556ce91910a981b0c0f27f14896b /helix-term | |
parent | 4f335fabc834cac064c83ec2ec9f72ae4741f289 (diff) |
Support count for indent too
Diffstat (limited to 'helix-term')
-rw-r--r-- | helix-term/src/commands.rs | 3 |
1 files changed, 2 insertions, 1 deletions
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<usize> { } 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(), |