Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

selection bar vanishes on "Page-Down" #199

Closed
ghost opened this issue Jun 25, 2017 · 2 comments
Closed

selection bar vanishes on "Page-Down" #199

ghost opened this issue Jun 25, 2017 · 2 comments

Comments

@ghost
Copy link

ghost commented Jun 25, 2017

% seq 1 $LINES | pick and press "Down" (once or serveral times) then "Page-Down": the selection bar vanishes. The following should fix this:

--- pick.c.orig	2017-06-25 23:59:43.257283180 +0200
+++ pick.c	2017-06-26 00:32:17.077325615 +0200
@@ -449,8 +449,11 @@
 		case PAGE_DOWN:
 			if (selection + choices_lines < choices_count)
 				yscroll = selection += choices_lines;
-			else
+			else {
 				selection = choices_count - 1;
+				if (selection - yscroll >= choices_lines)
+					yscroll = choices_count - choices_lines;
+			}
 			break;
 		case PAGE_UP:
 			if (selection - choices_lines > 0)
@mptre
Copy link
Owner

mptre commented Jun 26, 2017

Good catch! Care to craft a PR? Also, make sure to wrap the if in
braces as well for consistency.

@mptre
Copy link
Owner

mptre commented Jun 26, 2017

Fix has been merged, closing for now. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant