From 8c82f8f140f45a76414fa28e842aabfbeffa864e Mon Sep 17 00:00:00 2001 From: Blaž Hrastnik Date: Fri, 19 Feb 2021 14:55:53 +0900 Subject: indent: use_list indentation, fix indentation bug on open_below use std::{ time::Duration // <- pressing `o` here would use }'s indent instead of prev line } --- helix-term/src/commands.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'helix-term/src') diff --git a/helix-term/src/commands.rs b/helix-term/src/commands.rs index 4fe80971..95c98b10 100644 --- a/helix-term/src/commands.rs +++ b/helix-term/src/commands.rs @@ -644,7 +644,7 @@ pub fn open_below(cx: &mut Context) { let indent_level = helix_core::indent::suggested_indent_for_pos( doc.syntax.as_ref(), &doc.state, - index, + index - 1, // need to match the indentation to the prev line true, ); let indent = " ".repeat(TAB_WIDTH).repeat(indent_level); -- cgit v1.2.3-70-g09d2