Determine whether the gutter was hovered

This commit is contained in:
Antonio Scandurra 2023-11-08 15:30:41 +01:00
parent dfc536b4f5
commit 15d40d6df5
2 changed files with 14 additions and 18 deletions

View file

@ -249,11 +249,6 @@ pub struct UnfoldAt {
pub buffer_row: u32,
}
#[action]
pub struct GutterHover {
pub hovered: bool,
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)]
pub enum InlayId {
Suggestion(usize),
@ -8309,15 +8304,12 @@ impl Editor {
}
}
// todo!()
// pub fn gutter_hover(
// &mut self,
// GutterHover { hovered }: &GutterHover,
// cx: &mut ViewContext<Self>,
// ) {
// self.gutter_hovered = *hovered;
// cx.notify();
// }
pub fn set_gutter_hovered(&mut self, hovered: bool, cx: &mut ViewContext<Self>) {
if hovered != self.gutter_hovered {
self.gutter_hovered = hovered;
cx.notify();
}
}
pub fn insert_blocks(
&mut self,