Only show breadcrumbs for terminals when there's a title (#20997)

Closes https://github.com/zed-industries/zed/issues/20475

Release Notes:

- Fixed terminal title and breadcrumbs behavior

---------

Co-authored-by: Thorsten Ball <thorsten@zed.dev>
This commit is contained in:
Kirill Bulatov 2024-11-21 19:57:09 +02:00 committed by GitHub
parent 395e25be25
commit 5ff49db92f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
12 changed files with 43 additions and 23 deletions

View file

@ -1,6 +1,7 @@
use std::{ops::ControlFlow, path::PathBuf, sync::Arc};
use crate::{default_working_directory, TerminalView};
use breadcrumbs::Breadcrumbs;
use collections::{HashMap, HashSet};
use db::kvp::KEY_VALUE_STORE;
use futures::future::join_all;
@ -138,8 +139,11 @@ impl TerminalPanel {
ControlFlow::Break(())
});
let buffer_search_bar = cx.new_view(search::BufferSearchBar::new);
pane.toolbar()
.update(cx, |toolbar, cx| toolbar.add_item(buffer_search_bar, cx));
let breadcrumbs = cx.new_view(|_| Breadcrumbs::new());
pane.toolbar().update(cx, |toolbar, cx| {
toolbar.add_item(buffer_search_bar, cx);
toolbar.add_item(breadcrumbs, cx);
});
pane
});
let subscriptions = vec![