aboutsummaryrefslogtreecommitdiff
path: root/helix-term
diff options
context:
space:
mode:
authorMatouš Dzivjak2022-10-20 22:05:04 +0000
committerGitHub2022-10-20 22:05:04 +0000
commit4cff6250548d279ab69627177bd55312adb822a6 (patch)
tree7197e8703439fcd10323dbf2e74c4839fe5544c8 /helix-term
parent36f97b6aadec1a5c0cc61859d4f456f005983be0 (diff)
chore(view): remove indent_unit helper fn (#4389)
Diffstat (limited to 'helix-term')
-rw-r--r--helix-term/src/commands.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/helix-term/src/commands.rs b/helix-term/src/commands.rs
index db10d851..a8dafc33 100644
--- a/helix-term/src/commands.rs
+++ b/helix-term/src/commands.rs
@@ -3022,7 +3022,7 @@ pub mod insert {
// TODO: round out to nearest indentation level (for example a line with 3 spaces should
// indent by one to reach 4 spaces).
- let indent = Tendril::from(doc.indent_unit());
+ let indent = Tendril::from(doc.indent_style.as_str());
let transaction = Transaction::insert(
doc.text(),
&doc.selection(view.id).clone().cursors(doc.text().slice(..)),
@@ -3122,7 +3122,7 @@ pub mod insert {
let count = cx.count();
let (view, doc) = current_ref!(cx.editor);
let text = doc.text().slice(..);
- let indent_unit = doc.indent_unit();
+ let indent_unit = doc.indent_style.as_str();
let tab_size = doc.tab_width();
let auto_pairs = doc.auto_pairs(cx.editor);
@@ -3647,7 +3647,7 @@ fn indent(cx: &mut Context) {
let lines = get_lines(doc, view.id);
// Indent by one level
- let indent = Tendril::from(doc.indent_unit().repeat(count));
+ let indent = Tendril::from(doc.indent_style.as_str().repeat(count));
let transaction = Transaction::change(
doc.text(),