New Modal implementation for gpui2

Release Notes:

N/A
This commit is contained in:
Conrad Irwin 2023-11-07 10:56:46 -07:00 committed by GitHub
commit c89d6eb292
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 420 additions and 102 deletions

View file

@ -349,10 +349,12 @@ impl Editor {
self.refresh_inlay_hints(InlayHintRefreshReason::NewLinesShown, cx);
}
// pub fn scroll_position(&self, cx: &mut ViewContext<Self>) -> gpui::Point<Pixels> {
// let display_map = self.display_map.update(cx, |map, cx| map.snapshot(cx));
// self.scroll_manager.anchor.scroll_position(&display_map)
// }
pub fn scroll_position(&self, cx: &mut ViewContext<Self>) -> gpui::Point<Pixels> {
let display_map = self.display_map.update(cx, |map, cx| map.snapshot(cx));
// todo!() Should `self.scroll_manager.anchor.scroll_position()` return `Pixels`?
// self.scroll_manager.anchor.scroll_position(&display_map)
todo!()
}
pub fn set_scroll_anchor(&mut self, scroll_anchor: ScrollAnchor, cx: &mut ViewContext<Self>) {
hide_hover(self, cx);