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
...@@ -400,18 +400,22 @@ int browse_key(int ch) { ...@@ -400,18 +400,22 @@ int browse_key(int ch) {
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;
nonfo++;
sort++; sort++;
}
nonfo++;
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;
nonfo++;
sort++; sort++;
}
nonfo++;
break; break;
/* refresh */ /* refresh */
...@@ -419,7 +423,6 @@ int browse_key(int ch) { ...@@ -419,7 +423,6 @@ int browse_key(int ch) {
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.
Please register or to comment