Open bezhermoso opened 1 month ago
ah, i see the problem now, but i'm pretty sure this is like using a shotgun to kill a fly. the terminal buffer should just get redrawn when you open alpha back up
@goolord I've found that something spams the WinResized
event whenever Alpha opens back up a second time, which cause Alpha to redraw over & over & over again because of this autocmd.
I cannot figure out what's causing the deluge of WinResized
events though. Any ideas?
Hmm, if I disable the terminal
element, then the event no longer spams. So it could be something in what the terminal element does that causes its own issue...
Hi @goolord, can you please expound on the terminal buffer should just get redrawn when you open alpha back up
?
Isn't this what this PR achieves? The opt.redraw = false
rightfully prevents the terminal from rerunning again during window resizes while Alpha is open, for example. In such cases the element is simply repositioned. This PR marks the element to be redrawn the next time Alpha is opened. Am I misunderstanding your ask?
The
alpha.term
extension deletes the terminal buffer onAlphaClosed
, which causes anInvalid window id: ...
error when the plugin tries to redraw things. This PR makes it so that it sets theredraw
option back totrue
when the Alpha buffer is closed. Doing it this way still avoids the infinite redraw problem that this flag was preventing.This should solve the issue reported here: https://github.com/goolord/alpha-nvim/issues/275