From f85f84a5d129143bee8b8a7d48084526689e285e Mon Sep 17 00:00:00 2001 From: Valdemar Lorenzen Date: Mon, 12 Oct 2026 10:07:58 +0200 Subject: [PATCH] style: remove tab separators --- docs/editing.md | 2 +- src/tui.rs | 12 ++---------- 2 files changed, 3 insertions(+), 11 deletions(-) diff --git a/docs/editing.md b/docs/editing.md index 9836e49..78b5793 100644 --- a/docs/editing.md +++ b/docs/editing.md @@ -218,7 +218,7 @@ Use `:tab.new` to open the current buffer in a new, focused tab with one pane. E | `:tab.close` | `config.core.tab.close` | Close the current tab and all its panes, protecting unsaved changes | | `:tab.force_close` | `config.core.tab.force_close` | Explicitly discard exclusively displayed edits and close the tab | -Multiple tabs show a single top row with padded numbered filenames, subtle separators, and dirty markers. The active tab uses bold accent text; the row keeps the terminal's background instead of painting a full-width band. Narrow terminals keep the active tab visible. New/close actions have no default keybinding; for example, `config.bind "leader t", config.core.tab.new`. +Multiple tabs show a single top row with padded numbered filenames and dirty markers. The active tab uses bold accent text; the row keeps the terminal's background instead of painting a full-width band. Narrow terminals keep the active tab visible. New/close actions have no default keybinding; for example, `config.bind "leader t", config.core.tab.new`. Closing a tab refuses dirty buffers whose final displayed owner would disappear, including a comparison's working and return buffers. Buffers displayed in another tab remain open with their edits, even on force-close. Other hidden buffers remain loaded. Closing the last tab quits only if every open buffer is clean; force-close quits without saving. diff --git a/src/tui.rs b/src/tui.rs index db82d1b..eb17340 100644 --- a/src/tui.rs +++ b/src/tui.rs @@ -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()