Make save all prompt less noisy (#24934)
Don't show clean items from dirty multibuffers, and dedupe filenames in case you have a file open in a buffer and a multibuffer Release Notes: - N/A
This commit is contained in:
parent
e0fc767c11
commit
79e3faffb2
2 changed files with 19 additions and 33 deletions
|
@ -2015,14 +2015,13 @@ impl Workspace {
|
|||
|
||||
if remaining_dirty_items.len() > 1 {
|
||||
let answer = workspace.update_in(&mut cx, |_, window, cx| {
|
||||
let (prompt, detail) = Pane::file_names_for_prompt(
|
||||
let detail = Pane::file_names_for_prompt(
|
||||
&mut remaining_dirty_items.iter().map(|(_, handle)| handle),
|
||||
remaining_dirty_items.len(),
|
||||
cx,
|
||||
);
|
||||
window.prompt(
|
||||
PromptLevel::Warning,
|
||||
&prompt,
|
||||
&"Do you want to save all changes in the following files?",
|
||||
Some(&detail),
|
||||
&["Save all", "Discard all", "Cancel"],
|
||||
cx,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue