Skip to content

Commit

Permalink
project panel: Allow confirming prompt with keyboard (#11346)
Browse files Browse the repository at this point in the history
The ability to confirm the file deletion prompt by pressing "Enter" was
broken in #11015

Release Notes:

- Restored the ability to confirm a prompt by pressing "Enter" when
deleting/trashing files
  • Loading branch information
bennetbo authored and ConradIrwin committed May 9, 2024
1 parent 7cb5ab2 commit fbe361e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion crates/project_panel/src/project_panel.rs
Original file line number Diff line number Diff line change
Expand Up @@ -904,7 +904,7 @@ impl ProjectPanel {
let operation = if trash { "Trash" } else { "Delete" };
let answer = (!skip_prompt).then(|| {
cx.prompt(
PromptLevel::Destructive,
PromptLevel::Info,
&format!("{operation:?} {file_name:?}?",),
None,
&["Delete", "Cancel"],
Expand Down

0 comments on commit fbe361e

Please sign in to comment.