summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPřemysl Janouch <p.janouch@gmail.com>2017-06-04 02:51:49 +0200
committerPřemysl Janouch <p.janouch@gmail.com>2017-06-04 04:32:29 +0200
commite8a0864eadf0ca64ef2cf0e2b5b654e63da92495 (patch)
tree28df5343e2b34af6e624b4a6529cba40bc0771a3
parent57b4a9688dd2d6f6985906b50aabe8fa0658e14a (diff)
downloadnncmpp-e8a0864eadf0ca64ef2cf0e2b5b654e63da92495.tar.gz
nncmpp-e8a0864eadf0ca64ef2cf0e2b5b654e63da92495.tar.xz
nncmpp-e8a0864eadf0ca64ef2cf0e2b5b654e63da92495.zip
Add an attribute for directories
Completely overrides row colors though.
-rw-r--r--nncmpp.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/nncmpp.c b/nncmpp.c
index 9b1bf68..933016e 100644
--- a/nncmpp.c
+++ b/nncmpp.c
@@ -33,6 +33,7 @@
/* Listview */ \
XX( EVEN, "even", -1, -1, 0 ) \
XX( ODD, "odd", -1, -1, 0 ) \
+ XX( DIRECTORY, "directory", -1, -1, 0 ) \
XX( SELECTION, "selection", -1, -1, A_REVERSE ) \
XX( SCROLLBAR, "scrollbar", -1, -1, 0 ) \
/* These are for debugging only */ \
@@ -1919,7 +1920,8 @@ library_tab_on_item_draw (size_t item_index, struct row_buffer *buffer,
case LIBRARY_FILE: prefix = " "; name = x.name; break;
default: hard_assert (!"invalid item type");
}
- row_buffer_append_args (buffer, prefix, 0, name, 0, NULL);
+ chtype attrs = x.type != LIBRARY_FILE ? APP_ATTR (DIRECTORY) : 0;
+ row_buffer_append_args (buffer, prefix, attrs, name, attrs, NULL);
}
static char