Improved upwards scrolling, and fixed go to bottom keybinding

pull/2/head
mananapr 5 years ago
parent d18f880c60
commit f6f15d37aa

1
.gitignore vendored

@ -0,0 +1 @@
cf

@ -19,9 +19,9 @@ Apart from this, I have always wanted an alternative to ranger that is faster wh
a similar UI.
## Todo
- [ ] Improve Upwards Scrolling
- [x] Improve Upwards Scrolling
- [ ] Show sorted directories before files
- [ ] Fix the `G` keybinding
- [x] Fix the `G` keybinding
- [ ] Add basic operations like renaming, copying etc.
- [ ] Show more info in the statusbar
- [ ] Add file previews

@ -170,7 +170,6 @@ int main(int argc, char* argv[])
wprintw(status_win, "%s@%s\t%s", getenv("USER"), getenv("HOSTNAME"), dir);
wrefresh(status_win);
// Print all the elements and highlight the selection
int t = 0;
for( i=start; i<len; i++ )
@ -245,7 +244,7 @@ int main(int argc, char* argv[])
selection = ( selection < 0 ) ? 0 : selection;
// Scrolling
if(len > maxy)
if(selection > maxy/2)
if(selection <= start + maxy/2)
{
if(start == 0)
wclear(current_win);
@ -288,10 +287,9 @@ int main(int argc, char* argv[])
case 'G':
selection = len - 1;
if(len > maxy - 2)
start = len - maxy - 1;
// Needs to be fixed
start = len - maxy + 2;
else
start = len - 1 - maxy - 4 + 3;
start = 0;
break;
}

Loading…
Cancel
Save