Pane focus working. Modals seem broken now
This commit is contained in:
@@ -60,7 +60,6 @@ const DEBUG_LINE_HEIGHT: f32 = 5.;
|
||||
pub enum Event {
|
||||
TitleChanged,
|
||||
CloseTerminal,
|
||||
Activate,
|
||||
Bell,
|
||||
Wakeup,
|
||||
}
|
||||
|
||||
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user