summaryrefslogtreecommitdiffstats
path: root/htop.c
diff options
context:
space:
mode:
authorHisham Muhammad <hisham@gobolinux.org>2009-02-17 18:13:25 +0000
committerHisham Muhammad <hisham@gobolinux.org>2009-02-17 18:13:25 +0000
commitc3d682b0f6bb4115e61554b2143c2dcc3c6df550 (patch)
treed95e4f83199fd3ec75062957a15a84dcebc3a4ab /htop.c
parentdc38fc2da39e35141074d31fd45bffd6f1761397 (diff)
fix bug #2171752
Diffstat (limited to 'htop.c')
-rw-r--r--htop.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/htop.c b/htop.c
index c74b6b3e..fc5a6411 100644
--- a/htop.c
+++ b/htop.c
@@ -282,6 +282,7 @@ int main(int argc, char** argv) {
int refreshTimeout = 0;
int resetRefreshTimeout = 5;
bool doRefresh = true;
+ bool doRecalculate = false;
Settings* settings;
Panel* killPanel = NULL;
@@ -353,8 +354,10 @@ int main(int argc, char** argv) {
int currScrollV = panel->scrollV;
if (follow)
currPid = ProcessList_get(pl, currPos)->pid;
- if (recalculate)
+ if (recalculate || doRecalculate) {
ProcessList_scan(pl);
+ doRecalculate = false;
+ }
if (refreshTimeout == 0) {
ProcessList_sort(pl);
refreshTimeout = 1;
@@ -728,12 +731,14 @@ int main(int argc, char** argv) {
settings->changed = true;
break;
case 'H':
+ doRecalculate = true;
refreshTimeout = 0;
pl->hideUserlandThreads = !pl->hideUserlandThreads;
pl->hideThreads = pl->hideUserlandThreads;
settings->changed = true;
break;
case 'K':
+ doRecalculate = true;
refreshTimeout = 0;
pl->hideKernelThreads = !pl->hideKernelThreads;
settings->changed = true;