Skip to content

Commit

Permalink
fix: restore empty file show dashboard (#441)
Browse files Browse the repository at this point in the history
  • Loading branch information
AbaoFromCUG authored Mar 26, 2024
1 parent 354e7bd commit 4d486e9
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions plugin/dashboard.lua
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,7 @@ vim.g.loaded_dashboard = 1
vim.api.nvim_create_autocmd('UIEnter', {
group = vim.api.nvim_create_augroup('Dashboard', { clear = true }),
callback = function()
if
vim.fn.argc() == 0
and vim.api.nvim_buf_line_count(0) == 1
and vim.api.nvim_buf_get_lines(0, 0, -1, false)[1] == ''
then
if vim.fn.argc() == 0 and vim.api.nvim_buf_get_name(0) == '' then
require('dashboard'):instance()
end
end,
Expand Down

0 comments on commit 4d486e9

Please sign in to comment.