-
-
Notifications
You must be signed in to change notification settings - Fork 195
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Restore user's UI options when switching tabs #455
Conversation
The result of this PR is now exactly what you're trying to prevent for LazyVim and others. |
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 And |
So for our use-case there's just nothing that should be restored? |
In LazyVim, lualine does already load, but we added 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.