diff options
author | 2020-02-26 20:49:20 +0530 | |
---|---|---|
committer | 2020-02-26 20:49:20 +0530 | |
commit | dd2be3238240d4cd9c43a122b2fb58a8ac1b537a (patch) | |
tree | 4e65a0c0dc0e8c90e6dc7d852d115e6a24e8bc47 /src | |
parent | f0f8008014a39e3a849a8b51b709afca90205525 (diff) | |
download | nnn-dd2be3238240d4cd9c43a122b2fb58a8ac1b537a.tar.gz |
Get rid of printw()
Diffstat (limited to 'src')
-rw-r--r-- | src/nnn.c | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -3173,6 +3173,8 @@ static void printent(const struct entry *ent, uint namecols, bool sel) static void printent_long(const struct entry *ent, uint namecols, bool sel) { char timebuf[18], permbuf[8], ind1 = '\0', ind2 = '\0', special = '\0'; + size_t len; + char *size; /* Timestamp */ strftime(timebuf, sizeof(timebuf), "%F %R", localtime(&ent->t)); @@ -3211,7 +3213,11 @@ static void printent_long(const struct entry *ent, uint namecols, bool sel) ind2 = '/'; } - printw("%8.8s", coolsize(cfg.blkorder ? ent->blocks << blk_shift : ent->size)); + size = coolsize(cfg.blkorder ? ent->blocks << blk_shift : ent->size); + len = 9 - strlen(size); + while (--len) + addch(' '); + addstr(size); break; case S_IFLNK: ind1 = ind2 = '@'; // fallthrough |