From e8c6994f40c9c69089e9f80abb2f895d2e077c7e Mon Sep 17 00:00:00 2001 From: Hisham Muhammad Date: Thu, 17 Dec 2020 19:08:56 -0300 Subject: Add "Tree view is always sorted by PID" option to mimic htop 2 behavior --- Action.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'Action.c') 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; } -- cgit v1.2.3