Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

add toggle right and bottom dock actions

Joseph Lyons2457c55fe7a0
diff --git a/crates/workspace/src/workspace.rs b/crates/workspace/src/workspace.rs
index 495989c1bed..40d170b0ded 100644
--- a/crates/workspace/src/workspace.rs
+++ b/crates/workspace/src/workspace.rs
@@ -119,6 +119,8 @@ actions!(
ActivateNextPane,
FollowNextCollaborator,
ToggleLeftDock,
+ ToggleRightDock,
+ ToggleBottomDock,
NewTerminal,
ToggleTerminalFocus,
NewSearch,
@@ -250,6 +252,12 @@ pub fn init(app_state: Arc<AppState>, cx: &mut AppContext) {
cx.add_action(|workspace: &mut Workspace, _: &ToggleLeftDock, cx| {
workspace.toggle_dock(DockPosition::Left, cx);
});
+ cx.add_action(|workspace: &mut Workspace, _: &ToggleRightDock, cx| {
+ workspace.toggle_dock(DockPosition::Right, cx);
+ });
+ cx.add_action(|workspace: &mut Workspace, _: &ToggleBottomDock, cx| {
+ workspace.toggle_dock(DockPosition::Bottom, cx);
+ });
cx.add_action(Workspace::activate_pane_at_index);
cx.add_action(|_: &mut Workspace, _: &install_cli::Install, cx| {
diff --git a/crates/zed/src/menus.rs b/crates/zed/src/menus.rs
index a98147c51b0..37e835c13de 100644
--- a/crates/zed/src/menus.rs
+++ b/crates/zed/src/menus.rs
@@ -90,6 +90,8 @@ pub fn menus() -> Vec<Menu<'static>> {
MenuItem::action("Reset Zoom", super::ResetBufferFontSize),
MenuItem::separator(),
MenuItem::action("Toggle Left Dock", workspace::ToggleLeftDock),
+ MenuItem::action("Toggle Right Dock", workspace::ToggleRightDock),
+ MenuItem::action("Toggle Bottom Dock", workspace::ToggleBottomDock),
MenuItem::submenu(Menu {
name: "Editor Layout",
items: vec![