Show navigation history in the file finder modal
co-authored-by: Max <max@zed.dev>
This commit is contained in:
parent
711d2c6fe7
commit
201d513c50
8 changed files with 162 additions and 165 deletions
|
@ -12,6 +12,7 @@ use gpui::{
|
|||
platform::{CursorStyle, MouseButton},
|
||||
AnyElement, AppContext, Border, Element, SizeConstraint, ViewContext, ViewHandle,
|
||||
};
|
||||
use std::sync::{atomic::AtomicUsize, Arc};
|
||||
use theme::Theme;
|
||||
pub use toggle_dock_button::ToggleDockButton;
|
||||
|
||||
|
@ -170,13 +171,21 @@ impl Dock {
|
|||
pub fn new(
|
||||
default_item_factory: DockDefaultItemFactory,
|
||||
background_actions: BackgroundActions,
|
||||
pane_history_timestamp: Arc<AtomicUsize>,
|
||||
cx: &mut ViewContext<Workspace>,
|
||||
) -> Self {
|
||||
let position =
|
||||
DockPosition::Hidden(settings::get::<WorkspaceSettings>(cx).default_dock_anchor);
|
||||
let workspace = cx.weak_handle();
|
||||
let pane =
|
||||
cx.add_view(|cx| Pane::new(workspace, Some(position.anchor()), background_actions, cx));
|
||||
let pane = cx.add_view(|cx| {
|
||||
Pane::new(
|
||||
workspace,
|
||||
Some(position.anchor()),
|
||||
background_actions,
|
||||
pane_history_timestamp,
|
||||
cx,
|
||||
)
|
||||
});
|
||||
pane.update(cx, |pane, cx| {
|
||||
pane.set_active(false, cx);
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue