[Bug] Actually disable winbar when using `disable` option
folliehiyuki opened this issue · 3 comments
Neovim version
NVIM v0.8.0
Build type: MinSizeRel
LuaJIT 2.1.0-beta3
Compiled by buildozer@build-edge-x86_64
Features: +acl +iconv +tui
See ":help feature-compile"
system vimrc file: "$VIM/sysinit.vim"
fall-back for $VIM: "/usr/share/nvim"
Run :checkhealth for more info
Feline version
master
branch
Describe the bug
Unlike statusline, when adding filetypes to disable.filetypes
list (e.g. NvimTree) I expect the winbar to not be there at all instead of an empty winbar.
To Reproduce
require('feline').winbar.setup {
components = {
active = {
{
{ provider = "Hello" },
},
},
},
disable = {
filetypes = { 'NvimTree' },
}
}
Expected behavior
The winbar is completely gone in the defined buffer.
Does this error occur in the minimal init file?
Provide modified minimal_init.lua
Screenshots
There is a blank line on the top (the winbar) of NvimTree buffer.
Additional context
Looking briefly at the code it is returning an empty string. I think it should return nil
in the winbar case.
This would not work as it is not allowed by Neovim to disable winbar on a per-window basis.
Thanks for answering!
Would it be ok for feline.nvim to support setting winbar through autocmd
with window option vim.wo.winbar (instead of setting it globally)? This way I can achieve the same result.
Thanks for answering!
Would it be ok for feline.nvim to support setting winbar through
autocmd
with window option vim.wo.winbar (instead of setting it globally)? This way I can achieve the same result.
That would be an antipattern. Plus there's already plans to add support for selectively disabling winbar for Neovim, so let's wait for that