Set attrs in a go

This commit is contained in:
Arun Prakash Jana 2020-03-01 12:19:17 +05:30
parent 5228528fac
commit 2b11601f89
No known key found for this signature in database
GPG key ID: A75979F35C080412

View file

@ -3196,10 +3196,7 @@ static void print_time(const time_t *timep)
static void printent(const struct entry *ent, uint namecols, bool sel)
{
char ind = get_ind(ent->mode, FALSE);
int attrs = sel ? A_REVERSE : 0;
if (ind == '@' || (ent->flags & HARD_LINK))
attrs |= A_DIM;
int attrs = ((ind == '@' || (ent->flags & HARD_LINK)) ? A_DIM : 0) | (sel ? A_REVERSE : 0);
if (!ind)
++namecols;