diff --git a/lua/heirline/init.lua b/lua/heirline/init.lua index b938b52..210ba62 100644 --- a/lua/heirline/init.lua +++ b/lua/heirline/init.lua @@ -31,15 +31,12 @@ local function setup_local_winbar_with_autocmd(callback) local winbuf = vim.api.nvim_win_get_buf(win) local new_args = vim.deepcopy(args) new_args.buf = winbuf - if callback and callback(new_args) == true then - vim.wo[win].winbar = nil - else + if not callback or callback(new_args) == false then vim.wo[win].winbar = "%{%v:lua.require'heirline'.eval_winbar()%}" end end end if callback and callback(args) == true then - vim.opt_local.winbar = nil return end