summaryrefslogtreecommitdiffstats
path: root/Settings.c
diff options
context:
space:
mode:
authorSohaib Mohamed <sohaib.amhmd@gmail.com>2021-10-18 17:55:54 +1100
committerNathan Scott <nathans@redhat.com>2021-12-07 17:04:49 +1100
commitcd6457ef88babcf5c0950e91b76d3b8ccf5d46bb (patch)
tree81c837049c217dd19973c93ad1ff6f938f827cb3 /Settings.c
parent31fe29c5a7e1e0b231012543065cacf13f52bf5b (diff)
Fixup tabs with dynamic Columns - add missing `Dynamic()`
Diffstat (limited to 'Settings.c')
-rw-r--r--Settings.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/Settings.c b/Settings.c
index dff39b57..a62ecb57 100644
--- a/Settings.c
+++ b/Settings.c
@@ -491,9 +491,12 @@ static bool Settings_read(Settings* this, const char* fileName, unsigned int ini
static void writeFields(FILE* fd, const ProcessField* fields, Hashtable* columns, bool byName, char separator) {
const char* sep = "";
for (unsigned int i = 0; fields[i]; i++) {
- if (fields[i] >= LAST_PROCESSFIELD || byName) {
+ if (fields[i] < LAST_PROCESSFIELD && byName) {
const char* pName = toFieldName(columns, fields[i]);
fprintf(fd, "%s%s", sep, pName);
+ } else if(fields[i] >= LAST_PROCESSFIELD && byName) {
+ const char* pName = toFieldName(columns, fields[i]);
+ fprintf(fd, " Dynamic(%s)", pName);
} else {
// This "-1" is for compatibility with the older enum format.
fprintf(fd, "%s%d", sep, (int) fields[i] - 1);

© 2014-2024 Faster IT GmbH | imprint | privacy policy