Upgrade tree-sitter to v0.20.6
This commit also adds a regression test to verify that with this new version we don't mistakenly compute a different suggestion on Rust buffer where the only change is leading whitespace.
This commit is contained in:
parent
5c4bd9393f
commit
8ebefa143a
3 changed files with 20 additions and 3 deletions
|
@ -649,6 +649,23 @@ fn test_autoindent_does_not_adjust_lines_with_unchanged_suggestion(cx: &mut Muta
|
|||
);
|
||||
buffer
|
||||
});
|
||||
|
||||
cx.add_model(|cx| {
|
||||
let text = "fn a() {\n {\n b()?\n }\n\n Ok(())\n}";
|
||||
let mut buffer = Buffer::new(0, text, cx).with_language(Arc::new(rust_lang()), cx);
|
||||
buffer.edit_with_autoindent([(Point::new(3, 4)..Point::new(3, 5), "")], 4, cx);
|
||||
assert_eq!(
|
||||
buffer.text(),
|
||||
"fn a() {\n {\n b()?\n \n\n Ok(())\n}"
|
||||
);
|
||||
|
||||
buffer.edit_with_autoindent([(Point::new(3, 0)..Point::new(3, 12), "")], 4, cx);
|
||||
assert_eq!(
|
||||
buffer.text(),
|
||||
"fn a() {\n {\n b()?\n\n\n Ok(())\n}"
|
||||
);
|
||||
buffer
|
||||
});
|
||||
}
|
||||
|
||||
#[gpui::test]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue