From 53cc0802c32bbd30b8a03582b0f02031c5a2eb0f Mon Sep 17 00:00:00 2001 From: Stephen Waits Date: Sun, 12 Apr 2026 16:21:23 -0600 Subject: [PATCH] fix: clear inherited winbar on bar windows MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The source window has `winbar = " %f"` set by set_debug_chrome for the filename chip. When open_bars does `:topleft split` / `:botright split` from that window, the new bar windows inherit its winbar. The inherited winbar renders an extra chrome row at the TOP of each bar window, ABOVE our Row 0 separator — showing the scratch buffer's empty filename, which reads as a phantom empty row sandwiched between our separator and whatever sits above/below. Explicitly `vim.wo[win].winbar = ""` in setup_bar_win first-thing, so the bar shows only its own 3 rows (top sep / content / bottom sep) with no inherited chrome. --- lua/turbo-debug/mode.lua | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/lua/turbo-debug/mode.lua b/lua/turbo-debug/mode.lua index ea0f439..80619fd 100644 --- a/lua/turbo-debug/mode.lua +++ b/lua/turbo-debug/mode.lua @@ -498,6 +498,15 @@ local function setup_bar_buf(buf) end local function setup_bar_win(win) + -- CRITICAL: clear winbar first. `:topleft split` / `:botright split` + -- inherits window-local options from the window we split off of. The + -- caller is the source window, which has `winbar = " %f"` set by + -- `set_debug_chrome`. Inherited onto the bar, that renders as an + -- extra chrome row ABOVE our own separator (since winbar sits above + -- the buffer rows), showing the scratch buffer's empty filename — + -- the phantom "second separator" the user sees stacked above the + -- legend bar. Explicit empty string disables the winbar entirely. + vim.wo[win].winbar = "" -- Include StatusLine/StatusLineNC so any statusline row the bar -- might pick up (with laststatus=2 every window gets one) blends -- into the bar's Normal bg instead of rendering in the dark default