summaryrefslogtreecommitdiffstats
path: root/Panel.c
diff options
context:
space:
mode:
authorChristian Göttsche <cgzones@googlemail.com>2021-01-30 23:45:00 +0100
committercgzones <cgzones@googlemail.com>2021-01-31 21:44:00 +0100
commit06b1674aa6202a91caf879fa4b0dae1244bf48b1 (patch)
tree87109d0d55c6c4e028d95fa0ec4e0c531bb70268 /Panel.c
parent51e79ddc07c0b3e070b5fe395703ce7ffe1878b9 (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.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Panel.c b/Panel.c
index 986a9895..c43fafcd 100644
--- a/Panel.c
+++ b/Panel.c
@@ -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

© 2014-2024 Faster IT GmbH | imprint | privacy policy