diff --git a/assets/keymaps/default.json b/assets/keymaps/default.json index 0e13bae79487d7d972de09fe007567c33b6a358c..833fefd0f2cf24b5546c97661f0128bd7b08a02d 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 1130050690061e22703fd8594d4bf799630f76b7..708f96856b03522d5dabab61cae178a340c9db27 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 49304dc2fa98dfec942bf6687be56cefc13cdf80..2eb6d3a1bfaeaa206f0cc8a0a03efa0387d144c2 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": {