Project Search: Don't prompt to save edited buffers in project search results if buffers open elsewhere (#31026)
Closes #ISSUE Release Notes: - N/A *or* Added/Fixed/Improved ...
This commit is contained in:
parent
110195cdae
commit
36ae564b61
2 changed files with 11 additions and 11 deletions
|
@ -1449,10 +1449,7 @@ impl Pane {
|
|||
}
|
||||
});
|
||||
if dirty_project_item_ids.is_empty() {
|
||||
if item.is_singleton(cx) && item.is_dirty(cx) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
return !(item.is_singleton(cx) && item.is_dirty(cx));
|
||||
}
|
||||
|
||||
for open_item in workspace.items(cx) {
|
||||
|
@ -1465,11 +1462,7 @@ impl Pane {
|
|||
let other_project_item_ids = open_item.project_item_model_ids(cx);
|
||||
dirty_project_item_ids.retain(|id| !other_project_item_ids.contains(id));
|
||||
}
|
||||
if dirty_project_item_ids.is_empty() {
|
||||
return true;
|
||||
}
|
||||
|
||||
false
|
||||
return dirty_project_item_ids.is_empty();
|
||||
}
|
||||
|
||||
pub(super) fn file_names_for_prompt(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue