Open sphynx79 opened 2 years ago
I think you can check if status line is being drawn for current window in your generator function. TJ will probably know exactly how to do that or if there is better way. Only reason I am saying this is because I draw different status line for various filetypes and I have such conditional in may generator function:
if ft ~= 'man' and (bufhidden ~= '' or bufhidden == 'wipe' or buftype == 'nofile') then
return {
-- 'short' status line here
}
end
I found a way to check if the current window is focused or not:
if win.win_id ~= vim.api.nvim_get_current_win() then
--- not active
else
--- active
end
the variable win
is passed to every segment function by express_line
Please can you tell me how i can set different statusline for active and inactive status line, This is my old status line, and i can see different element in active and inactive statusline
Thanks