Rebind ctrl-` to toggle terminal panel focus

Also, add `ctrl-~` to create new terminals.

Co-Authored-By: Mikayla Maki <mikayla@zed.dev>
This commit is contained in:
Antonio Scandurra 2023-05-17 17:35:10 +02:00
parent 747fbfadeb
commit f097444546
5 changed files with 42 additions and 34 deletions

View file

@ -1,7 +1,7 @@
use crate::TerminalView;
use gpui::{
elements::*, AppContext, Entity, ModelHandle, Subscription, View, ViewContext, ViewHandle,
WeakViewHandle, WindowContext,
actions, elements::*, AppContext, Entity, ModelHandle, Subscription, View, ViewContext,
ViewHandle, WeakViewHandle, WindowContext,
};
use project::Project;
use settings::{settings_file::SettingsFile, Settings, TerminalDockPosition, WorkingDirectory};
@ -11,6 +11,8 @@ use workspace::{
pane, DraggedItem, Pane, Workspace,
};
actions!(terminal_panel, [ToggleFocus]);
pub fn init(cx: &mut AppContext) {
cx.add_action(TerminalPanel::add_terminal);
}