fix: clear inherited winbar on bar windows

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.
This commit is contained in:
swaits committed 2026-04-12 16:21:23 -06:00
1 parent c02021ad5e
commit 53cc0802c3
1 file changed
+9
+9
View File
@@ -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