static void printent(const struct entry *ent, int sel, uint namecols)
{
wchar_t *wstr;
- unescape(ent->name, namecols, &wstr);
char ind = '\0';
switch (ent->mode & S_IFMT) {
break;
}
+ if (!ind)
+ ++namecols;
+
+ unescape(ent->name, namecols, &wstr);
+
/* Directories are always shown on top */
resetdircolor(ent->flags);
permbuf[2] = '0' + (ent->mode & 7);
permbuf[3] = '\0';
+ /* Add a column if no indicator is needed */
+ if (S_ISREG(ent->mode) && !(ent->mode & 0100))
+ ++namecols;
+
/* Trim escape chars from name */
const char *pname = unescape(ent->name, namecols, NULL);