fix: remove separator from pinned tab suffix
This commit is contained in:
+3
-3
@@ -46,7 +46,7 @@
|
|||||||
//! Esc returns to NORMAL without clearing the filter; another Esc closes. Search input editing shortcuts apply.
|
//! Esc returns to NORMAL without clearing the filter; another Esc closes. Search input editing shortcuts apply.
|
||||||
//! Matching selections survive filter edits; no matches leaves Enter/p without an action.
|
//! Matching selections survive filter edits; no matches leaves Enter/p without an action.
|
||||||
//! Pinned categories stay visible; browsing another category replaces the single temporary tab.
|
//! Pinned categories stay visible; browsing another category replaces the single temporary tab.
|
||||||
//! Pinned category tab titles use a dimmed `· p` suffix; Search, Feed, and temporary tabs do not.
|
//! Pinned category tab titles use a dimmed `p` suffix; Search, Feed, and temporary tabs do not.
|
||||||
//! The suffix stays dimmed when selected and counts toward whole-label wrapping without changing category names.
|
//! The suffix stays dimmed when selected and counts toward whole-label wrapping without changing category names.
|
||||||
//! Browsing a pinned category focuses its existing tab and removes the temporary tab.
|
//! Browsing a pinned category focuses its existing tab and removes the temporary tab.
|
||||||
//! Top-level `pinned_categories = ["Favorites"]` persists pins; missing category names are ignored.
|
//! Top-level `pinned_categories = ["Favorites"]` persists pins; missing category names are ignored.
|
||||||
@@ -1216,7 +1216,7 @@ impl App {
|
|||||||
for (index, view) in self.visible_views() {
|
for (index, view) in self.visible_views() {
|
||||||
let mut title = Span::raw(view.name.as_str());
|
let mut title = Span::raw(view.name.as_str());
|
||||||
let pinned = index >= 2 && self.config.pinned_categories.contains(&view.name);
|
let pinned = index >= 2 && self.config.pinned_categories.contains(&view.name);
|
||||||
let title_width = title.width() + 2 + if pinned { 4 } else { 0 }; // Padding and pin marker.
|
let title_width = title.width() + 2 + if pinned { 2 } else { 0 }; // Padding and pin marker.
|
||||||
if row_width != 0 && row_width + 1 + title_width > usize::from(area.width) {
|
if row_width != 0 && row_width + 1 + title_width > usize::from(area.width) {
|
||||||
tab_lines.push(Line::default());
|
tab_lines.push(Line::default());
|
||||||
row_width = 0;
|
row_width = 0;
|
||||||
@@ -1231,7 +1231,7 @@ impl App {
|
|||||||
}
|
}
|
||||||
row.spans.extend([" ".into(), title]);
|
row.spans.extend([" ".into(), title]);
|
||||||
if pinned {
|
if pinned {
|
||||||
row.spans.push(Span::styled(" · p", Style::new().dim()));
|
row.spans.push(Span::styled(" p", Style::new().dim()));
|
||||||
}
|
}
|
||||||
row.spans.push(" ".into());
|
row.spans.push(" ".into());
|
||||||
row_width += usize::from(row_width != 0) + title_width;
|
row_width += usize::from(row_width != 0) + title_width;
|
||||||
|
|||||||
Reference in New Issue
Block a user