Don't assume that cloning on split will reuse the same underlying model
Co-Authored-By: Max Brunsfeld <max@zed.dev>
This commit is contained in:
parent
7123407f42
commit
e278c423d3
5 changed files with 15 additions and 14 deletions
|
@ -12,7 +12,7 @@ use std::{
|
|||
ops::Range,
|
||||
path::PathBuf,
|
||||
};
|
||||
use workspace::{Item, ItemNavHistory, ItemView, Settings, Workspace};
|
||||
use workspace::{Item, ItemHandle, ItemNavHistory, ItemView, Settings, Workspace};
|
||||
|
||||
action!(Deploy);
|
||||
action!(Search);
|
||||
|
@ -223,8 +223,8 @@ impl ItemView for ProjectFindView {
|
|||
.update(cx, |editor, cx| editor.deactivated(cx));
|
||||
}
|
||||
|
||||
fn item_id(&self, _: &gpui::AppContext) -> usize {
|
||||
self.model.id()
|
||||
fn item(&self, _: &gpui::AppContext) -> Box<dyn ItemHandle> {
|
||||
Box::new(self.model.clone())
|
||||
}
|
||||
|
||||
fn tab_content(&self, style: &theme::Tab, _: &gpui::AppContext) -> ElementBox {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue