Skip to content

Commit 074f6a5

Browse files
authored
Fix hide.winbar (#469)
1 parent e6e33b8 commit 074f6a5

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

lua/dashboard/init.lua

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,6 @@ local function buf_local()
7777
['filetype'] = 'dashboard',
7878
['wrap'] = false,
7979
['signcolumn'] = 'no',
80-
['winbar'] = '',
8180
}
8281
for opt, val in pairs(opts) do
8382
vim.opt_local[opt] = val
@@ -95,6 +94,7 @@ function db:save_user_options()
9594
self.user_cursor_line = vim.opt.cursorline:get()
9695
self.user_laststatus_value = vim.opt.laststatus:get()
9796
self.user_tabline_value = vim.opt.showtabline:get()
97+
self.user_winbar_value = vim.opt.winbar:get()
9898
end
9999

100100
function db:set_ui_options(opts)
@@ -104,6 +104,9 @@ function db:set_ui_options(opts)
104104
if opts.hide.tabline then
105105
vim.opt.showtabline = 0
106106
end
107+
if opts.hide.winbar then
108+
vim.opt.winbar = ''
109+
end
107110
end
108111

109112
function db:restore_user_options(opts)
@@ -118,6 +121,10 @@ function db:restore_user_options(opts)
118121
if opts.hide.tabline and self.user_tabline_value then
119122
vim.opt.showtabline = tonumber(self.user_tabline_value)
120123
end
124+
125+
if opts.hide.winbar and self.user_winbar_value then
126+
vim.opt.winbar = self.user_winbar_value
127+
end
121128
end
122129

123130
function db:cache_opts()

0 commit comments

Comments
 (0)