nvimdev / dashboard-nvim

vim dashboard
MIT License
2.3k stars 187 forks source link

dashboard-nvim/lua/dashboard/theme/header.lua:106: Invalid buffer id: 1 #339

Closed teto closed 1 year ago

teto commented 1 year ago

Describe the bug On startup, if I enable a session manager that autoloads a session, I get

Error executing vim.schedule lua callback: .../nvim/lazy/dashboard-nvim/lua/dashboard/theme/header.lua:106: Invalid buffer id: 1                                                                
stack traceback:                                                                                                                                                                                
        [C]: in function '__index'                                                                                                                                                              
        .../nvim/lazy/dashboard-nvim/lua/dashboard/theme/header.lua:106: in function 'generate_header'                                                                                          
        ...e/nvim/lazy/dashboard-nvim/lua/dashboard/theme/hyper.lua:418: in function 'callback'                                                                                                 
        ...e/nvim/lazy/dashboard-nvim/lua/dashboard/theme/hyper.lua:140: in function ''                                                                                                         
        vim/_editor.lua: in function <vim/_editor.lua:0>       

. Disabling neovim-session-manager fixes it.

To Reproduce I am using neovim master (~0.9) with this plugin's HEAD as well My lazy.nvim config:

{
  'glepnir/dashboard-nvim',
  event = 'VimEnter',
  config = function()
    require('dashboard').setup {
      -- config
    }
  end,
  dependencies = { {'nvim-tree/nvim-web-devicons'}}
},

Expected behavior no error on startup

teto commented 1 year ago

I confirm that fixed it thanks !