mirror of
https://github.com/zed-industries/zed.git
synced 2024-12-26 10:40:54 +00:00
Fixed terminal stealing focus
This commit is contained in:
parent
75594fc3e3
commit
9b32678b05
1 changed files with 9 additions and 7 deletions
|
@ -453,13 +453,15 @@ impl TerminalElement {
|
|||
}
|
||||
}
|
||||
})
|
||||
.on_scroll(TerminalElement::generic_button_handler(
|
||||
connection,
|
||||
origin,
|
||||
move |terminal, origin, e, _cx| {
|
||||
terminal.scroll_wheel(e, origin);
|
||||
},
|
||||
));
|
||||
.on_scroll(move |event, cx| {
|
||||
// cx.focus_parent_view();
|
||||
if let Some(conn_handle) = connection.upgrade(cx.app) {
|
||||
conn_handle.update(cx.app, |terminal, cx| {
|
||||
terminal.scroll_wheel(event, origin);
|
||||
cx.notify();
|
||||
})
|
||||
}
|
||||
});
|
||||
|
||||
// Mouse mode handlers:
|
||||
// All mouse modes need the extra click handlers
|
||||
|
|
Loading…
Reference in a new issue