diff options
author | Christian Göttsche <cgzones@googlemail.com> | 2021-01-30 23:45:00 +0100 |
---|---|---|
committer | cgzones <cgzones@googlemail.com> | 2021-01-31 21:44:00 +0100 |
commit | 06b1674aa6202a91caf879fa4b0dae1244bf48b1 (patch) | |
tree | 87109d0d55c6c4e028d95fa0ec4e0c531bb70268 /Panel.c | |
parent | 51e79ddc07c0b3e070b5fe395703ce7ffe1878b9 (diff) |
Improve handling when selected last process entry
If the last process entry is selected and the process dies, stay at the
end of the list and do not jump to the start.
Also if the last entry is selected keep, after rebuilding the process
list due to a new scan, the last entry selected.
Diffstat (limited to 'Panel.c')
-rw-r--r-- | Panel.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -246,8 +246,8 @@ void Panel_draw(Panel* this, bool force_redraw, bool focus, bool highlightSelect if (this->scrollV < 0) { this->scrollV = 0; this->needsRedraw = true; - } else if (this->scrollV >= size) { - this->scrollV = MAXIMUM(size - 1, 0); + } else if (this->scrollV > size - h) { + this->scrollV = MAXIMUM(size - h, 0); this->needsRedraw = true; } // ensure selection is on screen |