style: remove tab separators

This commit is contained in:
Valdemar Lorenzen
2026-10-12 10:07:58 +02:00
parent b733446c8b
commit f85f84a5d1
2 changed files with 3 additions and 11 deletions
+2 -10
View File
@@ -1042,21 +1042,13 @@ fn draw_tab_bar(frame: &mut Frame, editor: &Editor, area: Rect) -> Rect {
let mut first = active;
let padding = u16::from(bar.width > 1);
let mut width = labels[active].width() + usize::from(padding);
while first > 0 && width + 2 + labels[first - 1].width() <= usize::from(bar.width) {
while first > 0 && width + labels[first - 1].width() <= usize::from(bar.width) {
first -= 1;
width += 2 + labels[first].width();
width += labels[first].width();
}
let inactive = Style::default().fg(Color::Gray);
let mut x = bar.x + padding;
for (index, label) in labels.iter().enumerate().skip(first) {
if index != first {
let width = 2.min(bar.right() - x);
frame.render_widget(
Paragraph::new("│ ").style(Style::default().fg(Color::DarkGray)),
Rect::new(x, bar.y, width, 1),
);
x += width;
}
let width = label.width().min(usize::from(bar.right() - x)) as u16;
let style = if index == active {
Style::default()