Skip to content
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

fix: redraw only if the buffer is valid #290

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Biggybi
Copy link

@Biggybi Biggybi commented Jul 26, 2024

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.

  • open neovim, and create a file through Alpha, add text (autoscratch creates a new file)
  • exit and reopen neovim (autoscratch opens the file)
  • edit the file or resize the window

Related: #282.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant