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 now goes to top on KEY_NAVDOWN if lowermost option was selected, and vice versa #68

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions cf.c
Original file line number Diff line number Diff line change
Expand Up @@ -1873,7 +1873,7 @@ void handleFlags(char** directories)
void scrollUp()
{
selection--;
selection = ( selection < 0 ) ? 0 : selection;
selection = ( selection < 0 ) ? len-1 : selection;
// Scrolling
if(len >= maxy-1)
if(selection <= start + maxy/2)
Expand All @@ -1895,7 +1895,7 @@ void scrollUp()
void scrollDown()
{
selection++;
selection = ( selection > len-1 ) ? len-1 : selection;
selection = ( selection > len-1 ) ? 0 : selection;
// Scrolling
if(len >= maxy-1)
if(selection - 1 > maxy/2)
Expand Down