mirror of
https://github.com/zed-industries/zed.git
synced 2025-01-11 21:13:02 +00:00
Added background styling of the ...
This commit is contained in:
parent
c397fd9a71
commit
b53d1eef71
1 changed files with 19 additions and 0 deletions
|
@ -5863,6 +5863,12 @@ impl Editor {
|
|||
}
|
||||
}
|
||||
});
|
||||
let click_ranges = self.clone_click_ranges::<FoldMarker>();
|
||||
self.highlight_background::<FoldMarker>(
|
||||
click_ranges,
|
||||
|theme| theme.editor.document_highlight_write_background,
|
||||
cx,
|
||||
);
|
||||
|
||||
cx.notify();
|
||||
}
|
||||
|
@ -5905,6 +5911,12 @@ impl Editor {
|
|||
}
|
||||
}
|
||||
});
|
||||
let click_ranges = self.clone_click_ranges::<FoldMarker>();
|
||||
self.highlight_background::<FoldMarker>(
|
||||
click_ranges,
|
||||
|theme| theme.editor.document_highlight_write_background,
|
||||
cx,
|
||||
);
|
||||
|
||||
cx.notify();
|
||||
}
|
||||
|
@ -6031,6 +6043,13 @@ impl Editor {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn clone_click_ranges<T: ClickRange>(&self) -> Vec<Range<Anchor>> {
|
||||
self.clickable_text
|
||||
.get(&TypeId::of::<T>())
|
||||
.map(|click_range| click_range.1.clone())
|
||||
.unwrap_or_default()
|
||||
}
|
||||
|
||||
pub fn change_click_ranges<T: ClickRange>(
|
||||
&mut self,
|
||||
cx: &mut ViewContext<Self>,
|
||||
|
|
Loading…
Reference in a new issue