From 062e7a03a9604c39ec8ead4542d0493b469f9a19 Mon Sep 17 00:00:00 2001 From: Max Brunsfeld Date: Wed, 18 Jan 2023 15:17:44 -0800 Subject: [PATCH] Update comments in Pane::close_items --- crates/workspace/src/pane.rs | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/crates/workspace/src/pane.rs b/crates/workspace/src/pane.rs index 05d6de1ee2..8d0d731551 100644 --- a/crates/workspace/src/pane.rs +++ b/crates/workspace/src/pane.rs @@ -806,7 +806,7 @@ impl Pane { cx.spawn(|workspace, mut cx| async move { let mut saved_project_items_ids = HashSet::default(); for item in items_to_close.clone() { - // Find the item's current index and its set of project entries. Avoid + // Find the item's current index and its set of project item models. Avoid // storing these in advance, in case they have changed since this task // was started. let (item_ix, mut project_item_ids) = pane.read_with(&cx, |pane, cx| { @@ -818,11 +818,9 @@ impl Pane { continue; }; - // If an item hasn't yet been associated with a project entry, then always - // prompt to save it before closing it. Otherwise, check if the item has - // any project entries that are not open anywhere else in the workspace, - // AND that the user has not already been prompted to save. If there are - // any such project entries, prompt the user to save this item. + // Check if this view has any project items that are not open anywhere else + // in the workspace, AND that the user has not already been prompted to save. + // If there are any such project entries, prompt the user to save this item. workspace.read_with(&cx, |workspace, cx| { for item in workspace.items(cx) { if !items_to_close