diff options
Diffstat (limited to 'apps/tree.c')
-rw-r--r-- | apps/tree.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/apps/tree.c b/apps/tree.c index 54e0b75551..d8270e3268 100644 --- a/apps/tree.c +++ b/apps/tree.c | |||
@@ -394,7 +394,7 @@ bool dirbrowse(char *root) | |||
394 | browse_speed++; /* increase the browse speed every time we get here */ | 394 | browse_speed++; /* increase the browse speed every time we get here */ |
395 | if(filesindir) { | 395 | if(filesindir) { |
396 | if(dircursor) { | 396 | if(dircursor) { |
397 | if (browse_speed < 7) { | 397 | if (browse_speed < TREE_MAX_ON_SCREEN - 1) { |
398 | /* moving the cursor up through a full screen */ | 398 | /* moving the cursor up through a full screen */ |
399 | put_cursorxy(0, CURSOR_Y + LINE_Y+dircursor, | 399 | put_cursorxy(0, CURSOR_Y + LINE_Y+dircursor, |
400 | false); | 400 | false); |
@@ -412,8 +412,8 @@ bool dirbrowse(char *root) | |||
412 | else { | 412 | else { |
413 | if (start) { | 413 | if (start) { |
414 | /* leaving the cursor at top line and moving screen down */ | 414 | /* leaving the cursor at top line and moving screen down */ |
415 | if (browse_speed >=7) | 415 | if (browse_speed >=TREE_MAX_ON_SCREEN-1) |
416 | start = start - 7; | 416 | start = start - TREE_MAX_ON_SCREEN - 1; |
417 | else | 417 | else |
418 | start--; | 418 | start--; |
419 | if (start<0) | 419 | if (start<0) |