Register text input handlers via new element hook

Provide element bounds to the input handler's `bounds_for_rect` method.

Co-authored-by: Marshall <marshall@zed.dev>
This commit is contained in:
Max Brunsfeld 2023-11-08 15:48:55 -08:00
parent d273fa6dd0
commit 1a37d9edc6
7 changed files with 160 additions and 66 deletions

View file

@ -9752,8 +9752,9 @@ impl InputHandler for Editor {
fn bounds_for_range(
&self,
range_utf16: Range<usize>,
element_bounds: gpui::Bounds<Pixels>,
cx: &mut ViewContext<Self>,
) -> Option<gpui::Bounds<f32>> {
) -> Option<gpui::Bounds<Pixels>> {
// todo!()
// See how we did it before: `rect_for_range`
None