Truncate tabs in filenames (#50550)
Closes #19208 Authored-By: @ngauder Release Notes: - Editor: truncate long file names in tab titles --------- Co-authored-by: Nikolas Gauder <nikolas.gauder@tum.de> Co-authored-by: Zed Zippy <234243425+zed-zippy[bot]@users.noreply.github.com>
This commit is contained in:
1 parent
f19e4e0539
commit
2d54538fe1
1 file changed
+7
-4
@@ -735,10 +735,13 @@ impl Item for Editor {
|
||||
h_flex()
|
||||
.gap_2()
|
||||
.child(
|
||||
Label::new(self.title(cx).to_string())
|
||||
.color(label_color)
|
||||
.when(params.preview, |this| this.italic())
|
||||
.when(was_deleted, |this| this.strikethrough()),
|
||||
Label::new(util::truncate_and_trailoff(
|
||||
&self.title(cx),
|
||||
MAX_TAB_TITLE_LEN,
|
||||
))
|
||||
.color(label_color)
|
||||
.when(params.preview, |this| this.italic())
|
||||
.when(was_deleted, |this| this.strikethrough()),
|
||||
)
|
||||
.when_some(description, |this, description| {
|
||||
this.child(
|
||||
|
||||
Reference in new issue
Block a user