diff options
author | Arun Prakash Jana <engineerarun@gmail.com> | 2019-03-08 02:20:25 +0530 |
---|---|---|
committer | Arun Prakash Jana <engineerarun@gmail.com> | 2019-03-08 04:49:43 +0530 |
commit | 2d72465e7bccb3bf6431324bef37180ab643d166 (patch) | |
tree | 5ad160617419abb3c920a53d03adb2462c028349 | |
parent | 6709ac01ad73fbf6e9f0fb313986a11cbf49fbfe (diff) | |
download | nnn-2d72465e7bccb3bf6431324bef37180ab643d166.tar.gz |
Let user switch to detail mode in case of few columns
-rw-r--r-- | src/nnn.c | 9 |
1 files changed, 1 insertions, 8 deletions
@@ -2740,7 +2740,6 @@ static void redraw(char *path) static char buf[NAME_MAX + 65] __attribute__ ((aligned)); size_t ncols = COLS; int nlines = MIN(LINES - 4, ndents), i, attrs; - bool mode_changed = FALSE; /* Clear screen */ erase(); @@ -2806,10 +2805,9 @@ static void redraw(char *path) attroff(A_UNDERLINE); /* Fallback to light mode if less than 35 columns */ - if (ncols < 41 && cfg.showdetail) { + if (ncols < 35 && cfg.showdetail) { cfg.showdetail ^= 1; printptr = &printent; - mode_changed = TRUE; } /* Calculate the number of cols available to print entry name */ @@ -2877,11 +2875,6 @@ static void redraw(char *path) } else printmsg("0/0"); } - - if (mode_changed) { - cfg.showdetail ^= 1; - printptr = &printent_long; - } } static void browse(char *ipath) |