style: remove tab separators
This commit is contained in:
+2
-10
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user