Move terminal modal keymap context to the connected view
This commit is contained in:
parent
92de5ab000
commit
20d45221c9
2 changed files with 8 additions and 8 deletions
|
@ -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
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue