mirror of
https://github.com/LazyVim/LazyVim.git
synced 2025-06-24 09:48:59 +02:00
fix(alpha): reset laststatus when alpha unloads. Fixes #1623
This commit is contained in:
parent
3c92fa4eb0
commit
30d573502a
1 changed files with 11 additions and 0 deletions
|
@ -316,11 +316,13 @@ return {
|
|||
return dashboard
|
||||
end,
|
||||
config = function(_, dashboard)
|
||||
local laststatus = vim.o.laststatus
|
||||
vim.o.laststatus = 0
|
||||
-- close Lazy and re-open when the dashboard is ready
|
||||
if vim.o.filetype == "lazy" then
|
||||
vim.cmd.close()
|
||||
vim.api.nvim_create_autocmd("User", {
|
||||
once = true,
|
||||
pattern = "AlphaReady",
|
||||
callback = function()
|
||||
require("lazy").show()
|
||||
|
@ -328,9 +330,18 @@ return {
|
|||
})
|
||||
end
|
||||
|
||||
vim.api.nvim_create_autocmd("BufUnload", {
|
||||
once = true,
|
||||
buffer = vim.api.nvim_get_current_buf(),
|
||||
callback = function()
|
||||
vim.opt.laststatus = laststatus
|
||||
end,
|
||||
})
|
||||
|
||||
require("alpha").setup(dashboard.opts)
|
||||
|
||||
vim.api.nvim_create_autocmd("User", {
|
||||
once = true,
|
||||
pattern = "LazyVimStarted",
|
||||
callback = function()
|
||||
local stats = require("lazy").stats()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue