garybernhardt/selecta

Redraw on WINCH signal

Closed this issue · 2 comments

Redraw on WINCH signal

Huh, I thought this used to work for me. In any event, Selecta redraws correctly once you type something, so this shouldn't be too tough to implement.

Fully handling WINCH would require a big design change, since the UI height is computed at startup. However, I just pushed a commit (d2f4371) to mitigate UI weirdness during resize. This makes Selecta behave nicely when the terminal is resized horizontally, and when resized vertically as long as there are more than 21 lines. It will still act weird if Selecta is started, and the terminal is resized to fewer than 21 lines while Selecta is still running. That's a pretty weird edge case, so I'm willing to punt on it for now. Thanks for pointing this out, though; my terminals are always full-screen, so I never considered it.