fix: remove separator from pinned tab suffix

This commit is contained in:
2026-10-11 14:51:17 +02:00
parent ae5ee57028
commit 924d84b46b
+3 -3
View File
@@ -46,7 +46,7 @@
//! 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.
//! 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.
//! 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.
@@ -1216,7 +1216,7 @@ impl App {
for (index, view) in self.visible_views() {
let mut title = Span::raw(view.name.as_str());
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) {
tab_lines.push(Line::default());
row_width = 0;
@@ -1231,7 +1231,7 @@ impl App {
}
row.spans.extend([" ".into(), title]);
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_width += usize::from(row_width != 0) + title_width;