Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
Focus terminal view on mouse click in terminal
Kirill Bulatov80c779b95e61
diff --git a/crates/terminal_view/src/terminal_element.rs b/crates/terminal_view/src/terminal_element.rsindex 232d3c5535b..0ac189db0b2 100644--- a/crates/terminal_view/src/terminal_element.rs+++ b/crates/terminal_view/src/terminal_element.rs@@ -400,7 +400,8 @@ impl TerminalElement {region = region// Start selections.on_down(MouseButton::Left, move |event, v: &mut TerminalView, cx| {- cx.focus_parent();+ let terminal_view = cx.handle();+ cx.focus(&terminal_view);v.context_menu.update(cx, |menu, _cx| menu.delay_cancel());if let Some(conn_handle) = connection.upgrade(cx) {conn_handle.update(cx, |terminal, cx| {