diff options
author | Benny Baumann <BenBE@geshi.org> | 2020-11-01 01:09:51 +0100 |
---|---|---|
committer | Benny Baumann <BenBE@geshi.org> | 2020-11-02 22:15:01 +0100 |
commit | 45869513bfebba80cc2ab42e4218f68b34b1e6ac (patch) | |
tree | f064631dbff141bf1c945db8cff40b7bb82fd169 /MainPanel.c | |
parent | 61e14d4bb25268593019e6df3eb02264b4ac8e0e (diff) |
Embracing branches
Diffstat (limited to 'MainPanel.c')
-rw-r--r-- | MainPanel.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/MainPanel.c b/MainPanel.c index 9322fe02..be59abd3 100644 --- a/MainPanel.c +++ b/MainPanel.c @@ -100,8 +100,9 @@ static HandlerResult MainPanel_eventHandler(Panel* super, int ch) { if (reaction & HTOP_REDRAW_BAR) { MainPanel_updateTreeFunctions(this, this->state->settings->treeView); IncSet_drawBar(this->inc); - if (this->state->pauseProcessUpdate) + if (this->state->pauseProcessUpdate) { FunctionBar_append("PAUSED", CRT_colors[PAUSED]); + } } if (reaction & HTOP_UPDATE_PANELHDR) { ProcessList_printHeader(this->state->pl, Panel_getHeader(super)); @@ -135,9 +136,7 @@ int MainPanel_selectedPid(MainPanel* this) { const char* MainPanel_getValue(MainPanel* this, int i) { Process* p = (Process*) Panel_get((Panel*)this, i); - if (p) - return p->comm; - return ""; + return p ? p->comm : ""; } bool MainPanel_foreachProcess(MainPanel* this, MainPanel_ForeachProcessFn fn, Arg arg, bool* wasAnyTagged) { @@ -157,8 +156,10 @@ bool MainPanel_foreachProcess(MainPanel* this, MainPanel_ForeachProcessFn fn, Ar ok &= fn(p, arg); } } + if (wasAnyTagged) *wasAnyTagged = anyTagged; + return ok; } |