Truncate description in tab title when it is too long
This commit is contained in:
parent
07d269234f
commit
fd5cb02ea9
3 changed files with 9 additions and 4 deletions
|
@ -4,7 +4,7 @@ use crate::{
|
|||
ToggleWholeWord,
|
||||
};
|
||||
use collections::HashMap;
|
||||
use editor::{Anchor, Autoscroll, Editor, MultiBuffer, SelectAll};
|
||||
use editor::{Anchor, Autoscroll, Editor, MultiBuffer, SelectAll, MAX_TAB_TITLE_LEN};
|
||||
use gpui::{
|
||||
actions, elements::*, platform::CursorStyle, Action, AppContext, ElementBox, Entity,
|
||||
ModelContext, ModelHandle, MutableAppContext, RenderContext, Subscription, Task, View,
|
||||
|
@ -26,8 +26,6 @@ use workspace::{
|
|||
|
||||
actions!(project_search, [Deploy, SearchInNew, ToggleFocus]);
|
||||
|
||||
const MAX_TAB_TITLE_LEN: usize = 24;
|
||||
|
||||
#[derive(Default)]
|
||||
struct ActiveSearches(HashMap<WeakModelHandle<Project>, WeakViewHandle<ProjectSearchView>>);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue