Add test for go-to hunk and fix discovered bugs

This commit is contained in:
Julia
2022-10-28 15:08:13 -04:00
parent ae2021e073
commit 8361b4d47a
8 changed files with 145 additions and 72 deletions
@@ -151,6 +151,11 @@ impl<'a> EditorTestContext<'a> {
snapshot.anchor_before(ranges[0].start)..snapshot.anchor_after(ranges[0].end)
}
pub fn set_diff_base(&mut self, diff_base: Option<&str>) {
let diff_base = diff_base.map(String::from);
self.update_buffer(|buffer, cx| buffer.set_diff_base(diff_base, cx));
}
/// Change the editor's text and selections using a string containing
/// embedded range markers that represent the ranges and directions of
/// each selection.