From df35fd0026130b58a8d977e6da51f09544bfd09e Mon Sep 17 00:00:00 2001 From: Kirill Bulatov Date: Fri, 24 May 2024 22:02:21 +0300 Subject: [PATCH] Show Delete shortcuts in project panel context menu (#12250) Closes https://github.com/zed-industries/zed/issues/12234 by making both default keymap and the menu `Delete` action declarations to have the same `skip_prompt` value. `Trash` action got more explicit `skip_prompt` declarations in this PR, but those were the defaults already, so not changed. Now, `Delete` action in the project panel will always show a prompt before removing, both on the keystroke and menu item click. To note, VSCode does skips prompt for the `Trash` action, so we might want to change that too (later?), the PR does not alter it. Release Notes: - Shows Delete action binding keys in the project panel context menu ([12234](https://github.com/zed-industries/zed/issues/12234)) --- assets/keymaps/default-linux.json | 4 ++-- assets/keymaps/default-macos.json | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/assets/keymaps/default-linux.json b/assets/keymaps/default-linux.json index 8e127fecc5..2d7e693b3c 100644 --- a/assets/keymaps/default-linux.json +++ b/assets/keymaps/default-linux.json @@ -569,8 +569,8 @@ "enter": "project_panel::Rename", "backspace": "project_panel::Trash", "delete": "project_panel::Trash", - "ctrl-backspace": ["project_panel::Delete", { "skip_prompt": true }], - "ctrl-delete": ["project_panel::Delete", { "skip_prompt": true }], + "ctrl-backspace": ["project_panel::Delete", { "skip_prompt": false }], + "ctrl-delete": ["project_panel::Delete", { "skip_prompt": false }], "alt-ctrl-r": "project_panel::RevealInFinder", "alt-shift-f": "project_panel::NewSearchInDirectory" } diff --git a/assets/keymaps/default-macos.json b/assets/keymaps/default-macos.json index f5c509d543..09464c3d60 100644 --- a/assets/keymaps/default-macos.json +++ b/assets/keymaps/default-macos.json @@ -578,10 +578,10 @@ "cmd-alt-c": "project_panel::CopyPath", "alt-cmd-shift-c": "project_panel::CopyRelativePath", "enter": "project_panel::Rename", - "backspace": "project_panel::Trash", - "delete": "project_panel::Trash", - "cmd-backspace": ["project_panel::Delete", { "skip_prompt": true }], - "cmd-delete": ["project_panel::Delete", { "skip_prompt": true }], + "backspace": ["project_panel::Trash", { "skip_prompt": false }], + "delete": ["project_panel::Trash", { "skip_prompt": false }], + "cmd-backspace": ["project_panel::Delete", { "skip_prompt": false }], + "cmd-delete": ["project_panel::Delete", { "skip_prompt": false }], "alt-cmd-r": "project_panel::RevealInFinder", "alt-shift-f": "project_panel::NewSearchInDirectory" }