Skip to content

Commit

Permalink
Incresed memory size of sortmode and adjusted unsorted defaults
Browse files Browse the repository at this point in the history
* Should fix bug #103
  • Loading branch information
roberthawdon committed Jun 18, 2019
1 parent 362cac2 commit 13b965e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
7 changes: 3 additions & 4 deletions src/show.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ char currentpwd[4096];
int viewMode = 0;
int resized = 0;

char sortmode[5] = "name";
char sortmode[9] = "name";
char timestyle[9] = "locale";
int reverse = 0;
int human = 0;
Expand Down Expand Up @@ -81,7 +81,6 @@ extern history *hs;
extern int topfileref;
extern int selected;
extern int totalfilecount;
extern char sortmode[5];
extern int showhidden;

extern char globalConfLocation[4096];
Expand Down Expand Up @@ -786,7 +785,7 @@ Valid arguments are:\n\
}
break;
case 'f':
strcpy(sortmode, "none"); // This can be set to anything non valid
strcpy(sortmode, "unsorted"); // This needs to be set to "unsorted" to allow the settings menu to render correctly.
showhidden = 1;
break;
case 'S':
Expand Down Expand Up @@ -829,7 +828,7 @@ Valid arguments are:\n\
reverse = 1;
break;
case 'U':
strcpy(sortmode, "none"); // Again, invalid
strcpy(sortmode, "unsorted");
break;
case GETOPT_NODANGER_CHAR:
danger = 0;
Expand Down
2 changes: 1 addition & 1 deletion src/showfunctions.c
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ extern int useEnvPager;
extern int showProcesses;
extern int exitCode;

extern char sortmode[5];
extern char sortmode[9];

/* Formatting time in a similar fashion to `ls` */
static char const *long_time_format[2] =
Expand Down

0 comments on commit 13b965e

Please sign in to comment.