File tree Expand file tree Collapse file tree 2 files changed +12
-8
lines changed
Expand file tree Collapse file tree 2 files changed +12
-8
lines changed Original file line number Diff line number Diff line change @@ -12,10 +12,10 @@ local config = {
1212 selection_chars = ' FJDKSLA;CMRUEIWOQP' ,
1313
1414 -- whether you want to use winbar instead of the statusline
15- -- true means to always use winbar,
16- -- false means to never use winbar
17- -- nil means to use winbar if cmdheight=0 and statusline if cmdheight > 0
18- use_winbar = false , -- true | false | nil
15+ -- "always" means to always use winbar,
16+ -- "never" means to never use winbar
17+ -- "smart" means to use winbar if cmdheight=0 and statusline if cmdheight > 0
18+ use_winbar = true , -- "always" | "never" | "smart"
1919
2020 -- if you want to manually filter out the windows, pass in a function that
2121 -- takes two parameters. you should return window ids that should be
Original file line number Diff line number Diff line change @@ -164,11 +164,15 @@ function M.pick_window(custom_config)
164164 local win_opts = {}
165165 local win_map = {}
166166
167- -- calculate if we should use winbar or not
168- local use_winbar = v .opt .cmdheight :get () == 0
167+ local use_winbar = false
169168
170- if conf .use_winbar ~= nil then
171- use_winbar = conf .use_winbar
169+ -- calculate if we should use winbar or not
170+ if conf .use_winbar == ' always' then
171+ use_winbar = true
172+ elseif conf .use_winbar == ' never' then
173+ use_winbar = false
174+ elseif conf .use_winbar == ' smart' then
175+ use_winbar = v .opt .cmdheight :get () == 0
172176 end
173177
174178 local indicator_setting = use_winbar and ' winbar' or ' statusline'
You can’t perform that action at this time.
0 commit comments