Pane focus working. Modals seem broken now

This commit is contained in:
K Simmons 2022-08-09 15:09:38 -07:00
parent 049149320c
commit 6f180ed822
11 changed files with 43 additions and 103 deletions

View file

@ -153,10 +153,7 @@ impl View for TerminalView {
}
fn on_focus_in(&mut self, _: AnyViewHandle, cx: &mut ViewContext<Self>) {
cx.emit(Event::Activate);
cx.defer(|view, cx| {
cx.focus(view.content.handle());
});
cx.focus(self.content.handle());
}
fn keymap_context(&self, _: &gpui::AppContext) -> gpui::keymap::Context {
@ -314,10 +311,6 @@ impl Item for TerminalView {
fn should_close_item_on_event(event: &Self::Event) -> bool {
matches!(event, &Event::CloseTerminal)
}
fn should_activate_item_on_event(event: &Self::Event) -> bool {
matches!(event, &Event::Activate)
}
}
///Get's the working directory for the given workspace, respecting the user's settings.