Move terminal modal keymap context to the connected view

This commit is contained in:
K Simmons committed 2022-07-27 11:00:54 -07:00
1 parent 76ef8d5aca
commit 73858d0935
2 files changed
+8 -8

No files matched your search

+8
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
}
}
-8
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 {