mirror of
https://github.com/jarun/nnn.git
synced 2024-11-28 05:41:31 +00:00
Set dir to bold only if required
This commit is contained in:
parent
b1ff36eb05
commit
13ccf25551
|
@ -3438,11 +3438,13 @@ static void printent(const struct entry *ent, uint namecols, bool sel)
|
|||
break;
|
||||
case S_IFDIR:
|
||||
pair = C_DIR;
|
||||
if (!g_state.ctxcolor)
|
||||
attrs |= A_BOLD;
|
||||
ind = '/';
|
||||
break;
|
||||
case S_IFLNK:
|
||||
if (ent->flags & DIR_OR_LINK_TO_DIR) {
|
||||
if (!g_state.ctxcolor)
|
||||
attrs |= A_BOLD;
|
||||
ind = '/';
|
||||
} else
|
||||
|
@ -3536,6 +3538,7 @@ static void printent_long(const struct entry *ent, uint namecols, bool sel)
|
|||
switch (ent->mode & S_IFMT) {
|
||||
case S_IFDIR:
|
||||
pair = C_DIR;
|
||||
if (!g_state.ctxcolor)
|
||||
attrs |= A_BOLD;
|
||||
ind2 = '/'; // fallthrough
|
||||
case S_IFREG:
|
||||
|
@ -3570,7 +3573,7 @@ static void printent_long(const struct entry *ent, uint namecols, bool sel)
|
|||
pair = (ent->flags & SYM_ORPHAN) ? C_ORP : C_LNK;
|
||||
ind1 = '@';
|
||||
ind2 = (ent->flags & DIR_OR_LINK_TO_DIR) ? '/' : '@';
|
||||
if (ind2 == '/')
|
||||
if (ind2 == '/' && !g_state.ctxcolor)
|
||||
attrs |= A_BOLD; // fallthrough
|
||||
case S_IFSOCK:
|
||||
if (!ind1) {
|
||||
|
|
Loading…
Reference in a new issue