summaryrefslogtreecommitdiffstats
path: root/Process.c
diff options
context:
space:
mode:
authorHisham Muhammad <hisham@gobolinux.org>2020-12-17 20:09:55 -0300
committerBenBE <BenBE@geshi.org>2020-12-19 16:02:34 +0100
commit3d1703f16faf5bd3c73976909e1b6e03061a7f72 (patch)
tree45dbb3c0be0817b833b9d4a64376d9033b5ef2fe /Process.c
parent52fa4e7ee4816209ad82ba92ece8a3dc5b25ddd0 (diff)
Invert Process_compare resolution so that superclass matches run first
* This removes duplicated code that adjusts the sort direction from every OS-specific folder. * Most fields in a regular htop screen are OS-independent, so trying Process_compare first and only falling back to the OS-specific compareByKey function if it's an OS-specific field makes sense. * This will allow us to override the sortKey in a global way without having to edit each OS-specific file.
Diffstat (limited to 'Process.c')
-rw-r--r--Process.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Process.c b/Process.c
index c5ce737d..89fc8da4 100644
--- a/Process.c
+++ b/Process.c
@@ -555,6 +555,6 @@ long Process_compare(const void* v1, const void* v2) {
case USER:
return SPACESHIP_NULLSTR(p1->user, p2->user);
default:
- return SPACESHIP_NUMBER(p1->pid, p2->pid);
+ return Process_compareByKey(p1, p2, key);
}
}

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