Merge branch 'main' into search2
This commit is contained in:
commit
b11bfa8821
163 changed files with 20705 additions and 13985 deletions
|
@ -9,7 +9,7 @@ use collections::HashSet;
|
|||
use futures::future::try_join_all;
|
||||
use gpui::{
|
||||
div, point, AnyElement, AppContext, AsyncAppContext, Entity, EntityId, EventEmitter,
|
||||
FocusHandle, Model, ParentElement, Pixels, SharedString, Styled, Subscription, Task, View,
|
||||
FocusHandle, Model, ParentComponent, Pixels, SharedString, Styled, Subscription, Task, View,
|
||||
ViewContext, VisualContext, WeakView,
|
||||
};
|
||||
use language::{
|
||||
|
@ -30,6 +30,7 @@ use std::{
|
|||
};
|
||||
use text::Selection;
|
||||
use theme::{ActiveTheme, Theme};
|
||||
use ui::{Label, TextColor};
|
||||
use util::{paths::PathExt, ResultExt, TryFutureExt};
|
||||
use workspace::item::{BreadcrumbText, FollowEvent, FollowableEvents, FollowableItemHandle};
|
||||
use workspace::{
|
||||
|
@ -595,16 +596,19 @@ impl Item for Editor {
|
|||
.flex_row()
|
||||
.items_center()
|
||||
.gap_2()
|
||||
.child(self.title(cx).to_string())
|
||||
.child(Label::new(self.title(cx).to_string()))
|
||||
.children(detail.and_then(|detail| {
|
||||
let path = path_for_buffer(&self.buffer, detail, false, cx)?;
|
||||
let description = path.to_string_lossy();
|
||||
|
||||
Some(
|
||||
div()
|
||||
.text_color(theme.colors().text_muted)
|
||||
.text_xs()
|
||||
.child(util::truncate_and_trailoff(&description, MAX_TAB_TITLE_LEN)),
|
||||
div().child(
|
||||
Label::new(util::truncate_and_trailoff(
|
||||
&description,
|
||||
MAX_TAB_TITLE_LEN,
|
||||
))
|
||||
.color(TextColor::Muted),
|
||||
),
|
||||
)
|
||||
})),
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue