Skip to content

Commit

Permalink
Support count for indent too
Browse files Browse the repository at this point in the history
  • Loading branch information
archseer committed May 18, 2021
1 parent 4f335fa commit f1dc25a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion helix-term/src/commands.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
Expand Down

0 comments on commit f1dc25a

Please sign in to comment.