Switch from delete file by default to trash file by default (#10875)
TODO: - [x] Don't immediately seg fault - [x] Implement for directories - [x] Add cmd-delete to remove files - [ ] ~~Add setting for trash vs. delete~~ You can just use keybindings to change the behavior. fixes https://github.com/zed-industries/zed/issues/7228 fixes https://github.com/zed-industries/zed/issues/5094 Release Notes: - Added a new `project_panel::Trash` action and changed the default behavior for `backspace` and `delete` in the project panel to send a file to the systems trash, instead of permanently deleting it ([#7228](https://github.com/zed-industries/zed/issues/7228), [#5094](https://github.com/zed-industries/zed/issues/5094)). The original behavior can be restored by adding the following section to your keybindings: ```json5 [ // ...Other keybindings... { "context": "ProjectPanel", "bindings": { "backspace": "project_panel::Delete", "delete": "project_panel::Delete", } } ]
This commit is contained in:
parent
5dbd23f6b0
commit
d2569afe66
11 changed files with 99 additions and 22 deletions
|
@ -3190,7 +3190,7 @@ async fn test_fs_operations(
|
|||
|
||||
project_b
|
||||
.update(cx_b, |project, cx| {
|
||||
project.delete_entry(dir_entry.id, cx).unwrap()
|
||||
project.delete_entry(dir_entry.id, false, cx).unwrap()
|
||||
})
|
||||
.await
|
||||
.unwrap();
|
||||
|
@ -3218,7 +3218,7 @@ async fn test_fs_operations(
|
|||
|
||||
project_b
|
||||
.update(cx_b, |project, cx| {
|
||||
project.delete_entry(entry.id, cx).unwrap()
|
||||
project.delete_entry(entry.id, false, cx).unwrap()
|
||||
})
|
||||
.await
|
||||
.unwrap();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue