lualine.nvim
lualine.nvim copied to clipboard
Bug: Component conditions not properly evaluation at launch
Self Checks
- [x] I'm using the latest lualine.
- [x] I didn't find the issue in existing issues or PRs.
How to reproduce the problem
Simple winbar
with a simple component
winbar = {
lualine_y = {
{
"%m %f",
cond = function()
return #vim.api.nvim_list_wins() > 1
end
},
},
},
inactive_winbar = {
lualine_y = {
{
"%m %f",
cond = function()
return #vim.api.nvim_list_wins() > 1
end
},
},
},
Expected behaviour
- Condition should only show winbar when more than 1 window is open.
- Condition should be evaluated at launch.
Actual behaviour
It looks like the condition is only evaluated after the first refresh cycle. Once lualine
launches the filename and state is shown. Then after a couple of seconds it disappears. It is working as intended afterwards.
Minimal config to reproduce the issue
Additional information
OS Name: Microsoft Windows 10 Enterprise
OS Version: 10.0.19045 N/A Build 19045
-------------------------------------------
NVIM v0.9.5
Build type: RelWithDebInfo
LuaJIT 2.1.1703942320
-------------------------------------------
lualine
branch master
commit af4c3cf