diff options
author | Daniel Ebert | 2023-09-16 16:22:46 +0000 |
---|---|---|
committer | Blaž Hrastnik | 2023-12-15 06:59:54 +0000 |
commit | d29a66f267afd79f83c0ddc2e483bfb407f4ed98 (patch) | |
tree | 2cda470baf199de6091cf290ea7f93e0b57240c5 /helix-core/tests/indent.rs | |
parent | 23fd145a56260293072622c4d64482fc6447af7c (diff) |
Implement relative indent queries,
i.e. also take into account the indentation of a previous
line when computing the indentation for a new line.
Diffstat (limited to 'helix-core/tests/indent.rs')
-rw-r--r-- | helix-core/tests/indent.rs | 4 |
1 files changed, 2 insertions, 2 deletions
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", |