working jump to definition with tests

This commit is contained in:
Keith Simmons 2022-06-24 15:02:18 -07:00
parent 848445455d
commit 92ab107fc9
26 changed files with 956 additions and 564 deletions

View file

@ -474,6 +474,14 @@ impl DisplaySnapshot {
pub fn longest_row(&self) -> u32 {
self.blocks_snapshot.longest_row()
}
#[cfg(any(test, feature = "test-support"))]
pub fn highlight_ranges<Tag: ?Sized + 'static>(
&self,
) -> Option<Arc<(HighlightStyle, Vec<Range<Anchor>>)>> {
let type_id = TypeId::of::<Tag>();
self.text_highlights.get(&Some(type_id)).cloned()
}
}
#[derive(Copy, Clone, Default, Eq, Ord, PartialOrd, PartialEq)]