Closed jbarap closed 5 months ago
The result of this PR is now exactly what you're trying to prevent for LazyVim and others. We're now no longer seeing the statusline after exiting the dashboard.
oh ..i don't look it carefully revert then.
@folke can you elaborate? I'd like to find a way to change this behavior without breaking stuff and It'd be helpful to know how LazyVim breaks.
In LazyVim we have hide.statusline = false
, so hiding is disabled. We did that because it caused issues when opening a file from the cmdline.
And
So for our use-case there's just nothing that should be restored?
In LazyVim, lualine does already load, but we added dashboard
to disabled filetypes.
vim.o.laststatus = 3
still.
So again, I think the problem with this PR is that settings are supposedly restored, while I explicitely tell dashboard to not touch my statusline.
Got it. I missed the check for the setting before attempting to restore the settings, sorry for breaking LazyVim! Can you check if #458 solves it?
Yep, all good now!
Currently, if the user has
opts.hide.statusline
oropts.hide.tabline
enabled, as long as a dashboard buffer exists, the user's UI components will stay hidden.This results in the following workflow behaving strangely:
This PR stores the user's UI preferences when starting a dashboard, and restores the user's UI settings every time he/she switches to a tab where there's no dashboard buffer visible.
Before (no tabline/statusline after running
DiffViewFileHistory
):After (the expected tabline/statusline load when dashboard isn't visible):
Feel free to close the PR if you have a nicer solution in mind or if you find edge cases with this approach.