From 433ae89b72bc17b52dc98eac633cdf9903d1e7c5 Mon Sep 17 00:00:00 2001 From: Daniel Lange Date: Fri, 11 Dec 2020 18:16:12 +0100 Subject: [PATCH 2/2] Fix paussing in tree mode Upstream commits 7b739b6 and db5687a --- Action.c | 2 ++ ScreenManager.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Action.c b/Action.c index 66934be..eccd985 100644 --- a/Action.c +++ b/Action.c @@ -273,6 +273,8 @@ static Htop_Reaction actionLowerPriority(State* st) { static Htop_Reaction actionInvertSortOrder(State* st) { Settings_invertSortOrder(st->settings); + if (st->pauseProcessUpdate) + ProcessList_sort(st->pl); return HTOP_REFRESH | HTOP_SAVE_SETTINGS; } diff --git a/ScreenManager.c b/ScreenManager.c index ac93721..94904b5 100644 --- a/ScreenManager.c +++ b/ScreenManager.c @@ -106,7 +106,7 @@ static void checkRecalculation(ScreenManager* this, double* oldTime, int* sortTi if (*rescan) { *oldTime = newTime; ProcessList_scan(pl, this->state->pauseProcessUpdate); - if (*sortTimeout == 0 || this->settings->treeView) { + if (!this->state->pauseProcessUpdate && (*sortTimeout == 0 || this->settings->treeView)) { ProcessList_sort(pl); *sortTimeout = 1; } -- 2.25.1