famiu/feline.nvim

[Bug] Winbar disappears from inactive pane

matthias-Q opened this issue · 2 comments

Neovim version
NVIM v0.8.0-v0.8.0
Build type: RelWithDebInfo
LuaJIT 2.1.0-beta3

Feline version
Master with commit hash: 83fcde2

Describe the bug
When components are specified in the winbar setup, the winbar disappears from the inactive pane.

To Reproduce
Use the following config snippet:

local winbar_components = {
    active = {},
    inactive = {},
}

local wincomps = {

    file = {
        info = {
            provider = {
                name = "file_info",
                opts = {
                    type = "relative",
                    file_modified_icon = "",
                },
            },
            hl = { fg = colors.cyan },
            left_sep = " ",
        },
    }

}
table.insert(winbar_components.active, {})
table.insert(winbar_components.active, {})
table.insert(winbar_components.active, {})
table.insert(winbar_components.inactive, {})
table.insert(winbar_components.inactive, {})
-- Right section
table.insert(winbar_components.active[1], wincomps.file.info)


require("feline").winbar.setup
    {
        components = winbar_components,
    }
require("feline").setup()

Steps to reproduce the behavior:

  1. Create a split buffer with 2 files
  2. swap active panes
  3. winbar disappears from active pane

Expected behavior
Winbar should always be visible. If the default setup is used, it works as expected.

Does this error occur in the minimal init file?
Checked with the minimal config. See above.

And check if your issue still occurs.

Provide modified minimal_init.lua
see above

Screenshots
Screenshot_20221003_103316
Screenshot_20221003_1033311

Additional context
Add any other context about the problem here (eg: other plugins that may conflict with this plugin, configuration options that you think might cause the issue, etc.).

famiu commented

The inactive winbar components table has no elements.. Why should Feline display anything on an inactive window if the inactive components table is empty? The solution is to just add the component you need to the inactive table

I was expecting feline to follow the normal behavior of winbar, which shows the information even if the pane is not focused. I will try you suggestion though.

[EDIT]
This did the trick, thanks,