diff options
author | Daniel Lange <DLange@git.local> | 2021-02-21 19:06:02 +0100 |
---|---|---|
committer | cgzones <cgzones@googlemail.com> | 2021-02-28 18:16:29 +0100 |
commit | 07a6efcb22c002ad09432e8dbe87eed888821c2c (patch) | |
tree | d02ce4f8617f14d3642fd749d757a6c730949257 /ProcessList.c | |
parent | 12c2337939cbdee21c437c28646f128667a162de (diff) |
Make the first tree item stable on expand / collapse again
Regression introduced with 06b1674
Diffstat (limited to 'ProcessList.c')
-rw-r--r-- | ProcessList.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ProcessList.c b/ProcessList.c index dcfa05dc..50a9b35d 100644 --- a/ProcessList.c +++ b/ProcessList.c @@ -535,7 +535,7 @@ void ProcessList_rebuildPanel(ProcessList* this) { if (this->following == -1) { /* If the last item was selected, keep the new last item selected */ - if (currPos == currSize - 1) + if (currPos > 0 && currPos == currSize - 1) Panel_setSelected(this->panel, Panel_size(this->panel) - 1); else Panel_setSelected(this->panel, currPos); |