garybernhardt / selecta

A fuzzy text selector for files and anything else you need to select. Use it from vim, from the command line, or anywhere you can run a shell command.
MIT License
1.34k stars 81 forks source link

Redraw on WINCH signal #92

Closed sgtpep closed 8 years ago

rschmitt commented 9 years ago

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.

garybernhardt commented 8 years ago

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.