Skip to content

Commit 6f40fa4

Browse files
committed
fix(statuscolumn, statusline, winbar): Custom values set by user & plugins is now respected
1 parent fd92ae0 commit 6f40fa4

File tree

3 files changed

+9
-0
lines changed

3 files changed

+9
-0
lines changed

lua/bars/statuscolumn.lua

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -315,6 +315,9 @@ statuscolumn.attach = function (window, ignore_enabled)
315315
elseif statuscolumn.state.attached_windows[window] == true then
316316
-- Do not attach if **already attached to a window**.
317317
return;
318+
elseif vim.wo[window].statuscolumn ~= vim.g.__statuscolumn then
319+
-- Do not attach to windows with `custom statuscolumn`.
320+
return;
318321
end
319322

320323
---@type integer

lua/bars/statusline.lua

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -583,6 +583,9 @@ statusline.attach = function (window)
583583
elseif statusline.state.attached_windows[window] == true then
584584
-- Do not attach if **already attached to a window**.
585585
return;
586+
elseif vim.wo[window].statusline ~= vim.g.__statusline then
587+
-- Do not attach to windows with `custom statusline`.
588+
return;
586589
end
587590

588591
---@type integer

lua/bars/winbar.lua

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -676,6 +676,9 @@ winbar.attach = function (window, ignore_enabled)
676676
elseif winbar.state.attached_windows[window] == true then
677677
-- Do not attach if **already attached to a window**.
678678
return;
679+
elseif vim.wo[window].winbar ~= vim.g.__winbar then
680+
-- Do not attach to windows with `custom winbar`.
681+
return;
679682
end
680683

681684
---@type integer

0 commit comments

Comments
 (0)