goolord / alpha-nvim

a lua powered greeter like vim-startify / dashboard-nvim
MIT License
1.82k stars 109 forks source link

fix: redraw only if the buffer is valid #290

Open Biggybi opened 1 month ago

Biggybi commented 1 month ago

Hi, and thank you for a great plugin.

This PR addresses an issue where Alpha attempts to redraw when the buffer is invalid, causing the WinResized autocmd to trigger in a loop.

   Error  12:10:54 AM msg_show.lua_error Error detected while processing WinResized Autocommands for "*":

It seems to occur if an autocmd on VimEnter opens buffers that we edit/resize.

I believe this check is reasonable, but I understand if you feel it should not be Alpha's responsibility.

Repro:

I encountered this issue using this script.

Related: #282.