From d29a66f267afd79f83c0ddc2e483bfb407f4ed98 Mon Sep 17 00:00:00 2001 From: Daniel Ebert Date: Sat, 16 Sep 2023 18:22:46 +0200 Subject: Implement relative indent queries, i.e. also take into account the indentation of a previous line when computing the indentation for a new line. --- helix-core/tests/indent.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'helix-core/tests') diff --git a/helix-core/tests/indent.rs b/helix-core/tests/indent.rs index 26010c90..cd96fcff 100644 --- a/helix-core/tests/indent.rs +++ b/helix-core/tests/indent.rs @@ -210,7 +210,6 @@ fn test_treesitter_indent( let suggested_indent = treesitter_indent_for_pos( indent_query, &syntax, - &indent_style, tab_width, indent_style.indent_width(tab_width), text, @@ -218,7 +217,8 @@ fn test_treesitter_indent( text.line_to_char(i) + pos, false, ) - .unwrap(); + .unwrap() + .to_string(&indent_style); assert!( line.get_slice(..pos).map_or(false, |s| s == suggested_indent), "Wrong indentation for file {:?} on line {}:\n\"{}\" (original line)\n\"{}\" (suggested indentation)\n", -- cgit v1.2.3-70-g09d2