Populate backward/forward stacks upon item deactivation

Co-Authored-By: Max Brunsfeld <max@zed.dev>
This commit is contained in:
Antonio Scandurra 2022-01-17 18:57:31 +01:00
parent bbf634f439
commit ea624c6cde
4 changed files with 121 additions and 56 deletions

View file

@ -15,9 +15,9 @@ use gpui::{
use language::{Bias, Buffer, Diagnostic, DiagnosticEntry, Point, Selection, SelectionGoal};
use postage::watch;
use project::{Project, ProjectPath, WorktreeId};
use std::{cmp::Ordering, mem, ops::Range, sync::Arc};
use std::{cmp::Ordering, mem, ops::Range, rc::Rc, sync::Arc};
use util::TryFutureExt;
use workspace::Workspace;
use workspace::{Navigation, Workspace};
action!(Deploy);
action!(OpenExcerpts);
@ -522,6 +522,7 @@ impl workspace::Item for ProjectDiagnostics {
fn build_view(
handle: ModelHandle<Self>,
workspace: &Workspace,
_: Rc<Navigation>,
cx: &mut ViewContext<Self::View>,
) -> Self::View {
ProjectDiagnosticsEditor::new(handle, workspace.weak_handle(), workspace.settings(), cx)