Skip to content

Commit eb0b080

Browse files
committed
fix: Fixed a bug with sub-modules not attaching in global_attach()
1 parent 31feeba commit eb0b080

File tree

2 files changed

+4
-7
lines changed

2 files changed

+4
-7
lines changed

lua/bars/statuscolumn.lua

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
--- Custom statuscolumn module.
22
local statuscolumn = {};
3-
local components = require("bars.components.statuscolumn");
43

54
--- Custom statuscolumn.
65
---@type string
@@ -251,6 +250,8 @@ end
251250
statuscolumn.render = function ()
252251
---|fS
253252

253+
local components = require("bars.components.statuscolumn");
254+
254255
local window = vim.g.statusline_winid;
255256
local buffer = vim.api.nvim_win_get_buf(window);
256257

@@ -470,9 +471,7 @@ statuscolumn.global_attach = function ()
470471
local ran_cond, stat = pcall(statuscolumn.config.condition, vim.api.nvim_get_current_buf(), vim.api.nvim_get_current_win());
471472

472473
if ran_cond == false or stat == false then
473-
return true;
474-
else
475-
return false;
474+
return;
476475
end
477476
end
478477

lua/bars/statusline.lua

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -526,9 +526,7 @@ statusline.global_attach = function ()
526526
local ran_cond, stat = pcall(statusline.config.condition, vim.api.nvim_get_current_buf(), vim.api.nvim_get_current_win());
527527

528528
if ran_cond == false or stat == false then
529-
return true;
530-
else
531-
return false;
529+
return;
532530
end
533531
end
534532

0 commit comments

Comments
 (0)