Implement an InputHandler trait for gpui2

Co-Authored-By: Marshall <marshall@zed.dev>
Co-Authored-By: Max <max@zed.dev>
Co-Authored-By: Julia <julia@zed.dev>
This commit is contained in:
Conrad Irwin 2023-11-07 16:30:04 -07:00
parent 9cdfce4956
commit b2ae08b159
6 changed files with 315 additions and 195 deletions

View file

@ -2623,6 +2623,10 @@ impl Element<Editor> for EditorElement {
}
});
if editor.focus_handle.is_focused(cx) {
cx.set_input_handler(editor.handle);
}
cx.with_content_mask(ContentMask { bounds }, |cx| {
let gutter_bounds = Bounds {
origin: bounds.origin,