Don't refcount window handles
This commit is contained in:
parent
afcc0d621b
commit
485c0a482e
20 changed files with 83 additions and 163 deletions
|
@ -851,11 +851,11 @@ mod tests {
|
|||
});
|
||||
let window = cx.add_window(|_| EmptyView);
|
||||
|
||||
let editor = cx.add_view(window.id(), |cx| {
|
||||
let editor = cx.add_view(window.window_id(), |cx| {
|
||||
Editor::for_buffer(buffer.clone(), None, cx)
|
||||
});
|
||||
|
||||
let search_bar = cx.add_view(window.id(), |cx| {
|
||||
let search_bar = cx.add_view(window.window_id(), |cx| {
|
||||
let mut search_bar = BufferSearchBar::new(cx);
|
||||
search_bar.set_active_pane_item(Some(&editor), cx);
|
||||
search_bar.show(cx);
|
||||
|
@ -1232,7 +1232,7 @@ mod tests {
|
|||
);
|
||||
let buffer = cx.add_model(|cx| Buffer::new(0, buffer_text, cx));
|
||||
let window = cx.add_window(|_| EmptyView);
|
||||
let window_id = window.id();
|
||||
let window_id = window.window_id();
|
||||
|
||||
let editor = cx.add_view(window_id, |cx| Editor::for_buffer(buffer.clone(), None, cx));
|
||||
|
||||
|
@ -1421,11 +1421,11 @@ mod tests {
|
|||
let buffer = cx.add_model(|cx| Buffer::new(0, buffer_text, cx));
|
||||
let window = cx.add_window(|_| EmptyView);
|
||||
|
||||
let editor = cx.add_view(window.id(), |cx| {
|
||||
let editor = cx.add_view(window.window_id(), |cx| {
|
||||
Editor::for_buffer(buffer.clone(), None, cx)
|
||||
});
|
||||
|
||||
let search_bar = cx.add_view(window.id(), |cx| {
|
||||
let search_bar = cx.add_view(window.window_id(), |cx| {
|
||||
let mut search_bar = BufferSearchBar::new(cx);
|
||||
search_bar.set_active_pane_item(Some(&editor), cx);
|
||||
search_bar.show(cx);
|
||||
|
|
|
@ -1568,7 +1568,7 @@ pub mod tests {
|
|||
let project = Project::test(fs.clone(), ["/dir".as_ref()], cx).await;
|
||||
let window = cx.add_window(|cx| Workspace::test_new(project, cx));
|
||||
let workspace = window.root(cx);
|
||||
let window_id = window.id();
|
||||
let window_id = window.window_id();
|
||||
|
||||
let active_item = cx.read(|cx| {
|
||||
workspace
|
||||
|
@ -1874,7 +1874,7 @@ pub mod tests {
|
|||
let project = Project::test(fs.clone(), ["/dir".as_ref()], cx).await;
|
||||
let window = cx.add_window(|cx| Workspace::test_new(project, cx));
|
||||
let workspace = window.root(cx);
|
||||
let window_id = window.id();
|
||||
let window_id = window.window_id();
|
||||
workspace.update(cx, |workspace, cx| {
|
||||
ProjectSearchView::deploy(workspace, &workspace::NewSearch, cx)
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue