summaryrefslogtreecommitdiffstats
path: root/Action.c
diff options
context:
space:
mode:
authorHisham Muhammad <hisham@gobolinux.org>2020-12-17 19:08:56 -0300
committerBenBE <BenBE@geshi.org>2020-12-19 16:02:34 +0100
commite8c6994f40c9c69089e9f80abb2f895d2e077c7e (patch)
tree7e5078da157f8efba1b3d3b82c95fed6c3276f9c /Action.c
parent3d1703f16faf5bd3c73976909e1b6e03061a7f72 (diff)
Add "Tree view is always sorted by PID" option to mimic htop 2 behavior
Diffstat (limited to 'Action.c')
-rw-r--r--Action.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/Action.c b/Action.c
index 7949b8a3..3335a430 100644
--- a/Action.c
+++ b/Action.c
@@ -160,6 +160,9 @@ static bool collapseIntoParent(Panel* panel) {
Htop_Reaction Action_setSortKey(Settings* settings, ProcessField sortKey) {
settings->sortKey = sortKey;
settings->direction = 1;
+ if (settings->treeViewAlwaysByPID) {
+ settings->treeView = false;
+ }
return HTOP_REFRESH | HTOP_SAVE_SETTINGS | HTOP_UPDATE_PANELHDR | HTOP_KEEP_FOLLOWING;
}

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