From 074f6a5cbb07dfd85189043c9c91bac644ecd15e Mon Sep 17 00:00:00 2001 From: Ernst Widerberg Date: Thu, 11 Jul 2024 08:35:57 +0200 Subject: [PATCH] Fix hide.winbar (#469) --- lua/dashboard/init.lua | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/lua/dashboard/init.lua b/lua/dashboard/init.lua index 799ffe1..7286e6c 100644 --- a/lua/dashboard/init.lua +++ b/lua/dashboard/init.lua @@ -77,7 +77,6 @@ local function buf_local() ['filetype'] = 'dashboard', ['wrap'] = false, ['signcolumn'] = 'no', - ['winbar'] = '', } for opt, val in pairs(opts) do vim.opt_local[opt] = val @@ -95,6 +94,7 @@ function db:save_user_options() self.user_cursor_line = vim.opt.cursorline:get() self.user_laststatus_value = vim.opt.laststatus:get() self.user_tabline_value = vim.opt.showtabline:get() + self.user_winbar_value = vim.opt.winbar:get() end function db:set_ui_options(opts) @@ -104,6 +104,9 @@ function db:set_ui_options(opts) if opts.hide.tabline then vim.opt.showtabline = 0 end + if opts.hide.winbar then + vim.opt.winbar = '' + end end function db:restore_user_options(opts) @@ -118,6 +121,10 @@ function db:restore_user_options(opts) if opts.hide.tabline and self.user_tabline_value then vim.opt.showtabline = tonumber(self.user_tabline_value) end + + if opts.hide.winbar and self.user_winbar_value then + vim.opt.winbar = self.user_winbar_value + end end function db:cache_opts()