From f55b24ddeef03991f6e0b396a16f674d21d4d3f5 Mon Sep 17 00:00:00 2001 From: Mikayla Maki Date: Wed, 13 Jul 2022 16:39:22 -0700 Subject: [PATCH] Fixed modal terminal bindings to not show in command palette --- assets/keymaps/default.json | 7 ++++++- crates/terminal/src/modal.rs | 5 ++++- styles/package-lock.json | 1 - 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/assets/keymaps/default.json b/assets/keymaps/default.json index 0e13bae794..833fefd0f2 100644 --- a/assets/keymaps/default.json +++ b/assets/keymaps/default.json @@ -409,7 +409,6 @@ "bindings": { "ctrl-c": "terminal::Sigint", "escape": "terminal::Escape", - "shift-escape": "terminal::DeployModal", "ctrl-d": "terminal::Quit", "backspace": "terminal::Del", "enter": "terminal::Return", @@ -422,5 +421,11 @@ "cmd-c": "terminal::Copy", "ctrl-l": "terminal::Clear" } + }, + { + "context": "ModalTerminal", + "bindings": { + "shift-escape": "terminal::DeployModal" + } } ] \ No newline at end of file diff --git a/crates/terminal/src/modal.rs b/crates/terminal/src/modal.rs index 1130050690..708f96856b 100644 --- a/crates/terminal/src/modal.rs +++ b/crates/terminal/src/modal.rs @@ -16,8 +16,11 @@ pub fn deploy_modal(workspace: &mut Workspace, _: &DeployModal, cx: &mut ViewCon if let Some(StoredConnection(stored_connection)) = possible_connection { // Create a view from the stored connection workspace.toggle_modal(cx, |_, cx| { - cx.add_view(|cx| Terminal::from_connection(stored_connection, true, cx)) + cx.add_view(|cx| Terminal::from_connection(stored_connection.clone(), true, cx)) }); + cx.set_global::>(Some(StoredConnection( + stored_connection.clone(), + ))); } else { // No connection was stored, create a new terminal if let Some(closed_terminal_handle) = workspace.toggle_modal(cx, |workspace, cx| { diff --git a/styles/package-lock.json b/styles/package-lock.json index 49304dc2fa..2eb6d3a1bf 100644 --- a/styles/package-lock.json +++ b/styles/package-lock.json @@ -5,7 +5,6 @@ "requires": true, "packages": { "": { - "name": "styles", "version": "1.0.0", "license": "ISC", "dependencies": {