Add tab tooltips

This commit is contained in:
Joseph Lyons 2023-04-14 17:46:53 -04:00
parent e655a6c767
commit ebe57254e0
10 changed files with 119 additions and 39 deletions

View file

@ -24,6 +24,7 @@ use settings::Settings;
use smallvec::SmallVec;
use std::{
any::{Any, TypeId},
borrow::Cow,
cmp::Ordering,
ops::Range,
path::PathBuf,
@ -531,6 +532,10 @@ impl Item for ProjectDiagnosticsEditor {
.update(cx, |editor, cx| editor.navigate(data, cx))
}
fn tab_tooltip_text<'a>(&'a self, _: &'a AppContext) -> Option<Cow<'a, str>> {
Some("Project Diagnostics".into())
}
fn is_dirty(&self, cx: &AppContext) -> bool {
self.excerpts.read(cx).is_dirty(cx)
}