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.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Number of visible choices

sos4nt opened this issue · 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.