garybernhardt/selecta

Number of visible choices

Closed this issue · 1 comments

Why is the number of visible choices limited to 20? It looks like a bug:

screenshot

Mostly because it allows you to see what was on the screen before. Selecta's most common use is as a fuzzy file finder for text editors, and in that case it's nice to leave some context visible without needing to scroll.

The fact that it does it at the bottom of the screen is just for implementation simplicity. Ruby's IO class provides winsize, so it's easy to position absolutely at the bottom. To position relatively under your shell prompt, we'd have to use only relative ANSI motion codes, which would be more complicated.