Move terminal modal keymap context to the connected view

This commit is contained in:
K Simmons 2022-07-27 11:00:54 -07:00
parent 92de5ab000
commit 20d45221c9
2 changed files with 8 additions and 8 deletions

View file

@ -173,4 +173,12 @@ impl View for ConnectedView {
self.terminal
.update(cx, |terminal, _| terminal.write_to_pty(text.into()));
}
fn keymap_context(&self, _: &gpui::AppContext) -> gpui::keymap::Context {
let mut context = Self::default_keymap_context();
if self.modal {
context.set.insert("ModalTerminal".into());
}
context
}
}

View file

@ -171,14 +171,6 @@ impl View for TerminalView {
cx.focus(view.content.handle());
});
}
fn keymap_context(&self, _: &gpui::AppContext) -> gpui::keymap::Context {
let mut context = Self::default_keymap_context();
if self.modal {
context.set.insert("ModalTerminal".into());
}
context
}
}
impl View for ErrorView {