Skip to content

Commit ede5576

Browse files
committed
fix(statusline): Fixed a bug with ignore_* not being respected
1 parent 1d11dd3 commit ede5576

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

lua/bars/statusline.lua

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -478,12 +478,18 @@ end
478478
statusline.attach = function (buffer)
479479
---|fS
480480

481+
local ft, bt = vim.bo[buffer].ft, vim.bo[buffer].bt;
482+
481483
if type(buffer) ~= "number" then
482484
return;
483485
elseif vim.api.nvim_buf_is_loaded(buffer) == false then
484486
return;
485487
elseif vim.api.nvim_buf_is_valid(buffer) == false then
486488
return;
489+
elseif vim.list_contains(statusline.config.ignore_filetypes, ft) then
490+
return;
491+
elseif vim.list_contains(statusline.config.ignore_buftypes, bt) then
492+
return;
487493
end
488494

489495
local windows = vim.fn.win_findbuf(buffer);

0 commit comments

Comments
 (0)