Start work on handling multibuffers properly when closing unsaved buffers

This commit is contained in:
Max Brunsfeld
2022-05-22 16:48:33 -07:00
parent 21206800bc
commit fbd589b589
12 changed files with 581 additions and 421 deletions
+5 -3
View File
@@ -11,6 +11,7 @@ use gpui::{
};
use project::{search::SearchQuery, Project};
use settings::Settings;
use smallvec::SmallVec;
use std::{
any::{Any, TypeId},
ops::Range,
@@ -18,7 +19,8 @@ use std::{
};
use util::ResultExt as _;
use workspace::{
menu::Confirm, Item, ItemNavHistory, Pane, ToolbarItemLocation, ToolbarItemView, Workspace,
menu::Confirm, Item, ItemHandle, ItemNavHistory, Pane, ToolbarItemLocation, ToolbarItemView,
Workspace,
};
actions!(project_search, [Deploy, SearchInNew, ToggleFocus]);
@@ -234,8 +236,8 @@ impl Item for ProjectSearchView {
None
}
fn project_entry_id(&self, _: &AppContext) -> Option<project::ProjectEntryId> {
None
fn project_entry_ids(&self, cx: &AppContext) -> SmallVec<[project::ProjectEntryId; 3]> {
self.results_editor.project_entry_ids(cx)
}
fn can_save(&self, _: &gpui::AppContext) -> bool {