diff --git a/CRT.c b/CRT.c index a487bc7a..7ae7c122 100644 --- a/CRT.c +++ b/CRT.c @@ -48,6 +48,8 @@ static const char* const CRT_treeStrAscii[LAST_TREE_STR] = { [TREE_STR_TEND] = ",", [TREE_STR_OPEN] = "+", [TREE_STR_SHUT] = "-", + [TREE_STR_ASC] = "+", + [TREE_STR_DESC] = "-", }; #ifdef HAVE_LIBNCURSESW @@ -61,6 +63,8 @@ static const char* const CRT_treeStrUtf8[LAST_TREE_STR] = { // WITH VERTICAL STROKE' (U+1FBAF, "\xf0\x9f\xae\xaf") when // Unicode 13 is common [TREE_STR_SHUT] = "\xe2\x94\x80", // ─ + [TREE_STR_ASC] = "\xe2\x96\xb3", // △ + [TREE_STR_DESC] = "\xe2\x96\xbd", // ▽ }; bool CRT_utf8 = false; diff --git a/CRT.h b/CRT.h index e6e75c08..4806994c 100644 --- a/CRT.h +++ b/CRT.h @@ -22,6 +22,8 @@ typedef enum TreeStr_ { TREE_STR_TEND, TREE_STR_OPEN, TREE_STR_SHUT, + TREE_STR_ASC, + TREE_STR_DESC, LAST_TREE_STR } TreeStr; diff --git a/ProcessList.c b/ProcessList.c index 9709f3c1..ed6459ca 100644 --- a/ProcessList.c +++ b/ProcessList.c @@ -112,6 +112,13 @@ void ProcessList_printHeader(ProcessList* this, RichString* header) { } RichString_appendWide(header, color, alignedProcessFieldTitle(fields[i])); + if (key == fields[i] && RichString_getCharVal(*header, RichString_size(header) - 1) == ' ') { + header->chlen--; // rewind to override space + RichString_appendnWide(header, + CRT_colors[PANEL_SELECTION_FOCUS], + CRT_treeStr[Settings_getActiveDirection(this->settings) == 1 ? TREE_STR_DESC : TREE_STR_ASC], + 1); + } if (COMM == fields[i] && settings->showMergedCommand) { RichString_appendAscii(header, color, "(merged)"); }