Skip to content

Commit

Permalink
Show Delete shortcuts in project panel context menu (zed-industries#1…
Browse files Browse the repository at this point in the history
…2250)

Closes zed-industries#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](zed-industries#12234))
  • Loading branch information
SomeoneToIgnore authored May 24, 2024
1 parent 27229bb commit df35fd0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions assets/keymaps/default-linux.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
Expand Down
8 changes: 4 additions & 4 deletions assets/keymaps/default-macos.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
Expand Down

0 comments on commit df35fd0

Please sign in to comment.