| ... | ... |
@@ -256,9 +256,6 @@ int main(int argc, char *argv[]) {
|
| 256 | 256 |
choices_init(&choices); |
| 257 | 257 |
choices_fread(&choices, stdin); |
| 258 | 258 |
|
| 259 |
- if (num_lines > choices.size) |
|
| 260 |
- num_lines = choices.size; |
|
| 261 |
- |
|
| 262 | 259 |
if (benchmark) {
|
| 263 | 260 |
if (!filter) {
|
| 264 | 261 |
fprintf(stderr, "Must specify -e/--show-matches with --benchmark\n"); |
| ... | ... |
@@ -278,6 +275,9 @@ int main(int argc, char *argv[]) {
|
| 278 | 275 |
tty_t tty; |
| 279 | 276 |
tty_init(&tty, tty_filename); |
| 280 | 277 |
|
| 278 |
+ if (num_lines > choices.size) |
|
| 279 |
+ num_lines = choices.size; |
|
| 280 |
+ |
|
| 281 | 281 |
if (num_lines + 1 > tty_getheight(&tty)) |
| 282 | 282 |
num_lines = tty_getheight(&tty) - 1; |
| 283 | 283 |
|