Rework hover delay, respect editor font size, and enable hover in multibuffers

This commit is contained in:
Keith Simmons 2022-06-08 11:09:25 -07:00
parent ee33fb03f2
commit b51bd87c10
5 changed files with 253 additions and 239 deletions

View file

@ -937,7 +937,7 @@ impl MultiBuffer {
&self,
position: impl ToOffset,
cx: &AppContext,
) -> Option<(ModelHandle<Buffer>, Range<text::Anchor>)> {
) -> Option<(ExcerptId, ModelHandle<Buffer>, Range<text::Anchor>)> {
let snapshot = self.read(cx);
let position = position.to_offset(&snapshot);
@ -945,6 +945,7 @@ impl MultiBuffer {
cursor.seek(&position, Bias::Right, &());
cursor.item().map(|excerpt| {
(
excerpt.id.clone(),
self.buffers
.borrow()
.get(&excerpt.buffer_id)