Skip to content

Commit

Permalink
Fix scroll up bug
Browse files Browse the repository at this point in the history
How to re-produce, press PageDown repeatedly:

  $ env LINES=10 ./pick -X <LICENSE

Reported by Jenz Guenther in PR #232.
  • Loading branch information
mptre committed Aug 27, 2017
1 parent 37500b2 commit 50e2748
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pick.c
Original file line number Diff line number Diff line change
Expand Up @@ -318,8 +318,8 @@ selected_choice(void)
if (tty_putc('\n') == EOF)
err(1, "tty_putc");
tty_putp(clr_eos, 1);
tty_putp(tty_parm1(parm_up_cursor, choices_count + 1),
1);
tty_putp(tty_parm1(parm_up_cursor,
(choices_count - yscroll) + 1), 1);
} else if (choices_count > 0) {
/*
* parm_up_cursor interprets 0 as 1, therefore only move
Expand Down

0 comments on commit 50e2748

Please sign in to comment.