Skip to content
Snippets Groups Projects
Commit f6e34e52 authored by Yorhel's avatar Yorhel
Browse files

Don't re-sort when pressing the browse keys without affecting the dir

parent ba243df0
No related branches found
No related tags found
No related merge requests found
...@@ -362,7 +362,7 @@ int browse_key(int ch) { ...@@ -362,7 +362,7 @@ int browse_key(int ch) {
browse_key_sel(winrows-3); browse_key_sel(winrows-3);
break; break;
/* sorting items */ /* sorting items */
case 'n': case 'n':
if(flags & BF_NAME) if(flags & BF_NAME)
toggle(flags, BF_DESC); toggle(flags, BF_DESC);
...@@ -394,32 +394,35 @@ int browse_key(int ch) { ...@@ -394,32 +394,35 @@ int browse_key(int ch) {
nonfo++; nonfo++;
break; break;
/* browsing */ /* browsing */
case 10: case 10:
case KEY_RIGHT: case KEY_RIGHT:
for(n=browse_dir; n!=NULL; n=n->next) for(n=browse_dir; n!=NULL; n=n->next)
if(n->flags & FF_BSEL) if(n->flags & FF_BSEL)
break; break;
if(n != NULL && n->sub != NULL) if(n != NULL && n->sub != NULL) {
browse_dir = n->sub; browse_dir = n->sub;
if(n == NULL && browse_dir != NULL && browse_dir->parent->parent) sort++;
}
if(n == NULL && browse_dir != NULL && browse_dir->parent->parent) {
browse_dir = browse_dir->parent->parent->sub; browse_dir = browse_dir->parent->parent->sub;
sort++;
}
nonfo++; nonfo++;
sort++;
break; break;
case KEY_LEFT: case KEY_LEFT:
if(browse_dir != NULL && browse_dir->parent->parent != NULL) if(browse_dir != NULL && browse_dir->parent->parent != NULL) {
browse_dir = browse_dir->parent->parent->sub; browse_dir = browse_dir->parent->parent->sub;
sort++;
}
nonfo++; nonfo++;
sort++;
break; break;
/* refresh */ /* refresh */
case 'r': case 'r':
if(browse_dir != NULL) if(browse_dir != NULL)
calc_init(getpath(browse_dir->parent), browse_dir->parent); calc_init(getpath(browse_dir->parent), browse_dir->parent);
nonfo++; nonfo++;
sort++;
break; break;
/* and other stuff */ /* and other stuff */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment