mirror of https://github.com/xzeldon/htop.git
Make the first tree item stable on expand / collapse again
Regression introduced with 06b1674
This commit is contained in:
parent
12c2337939
commit
07a6efcb22
|
@ -535,7 +535,7 @@ void ProcessList_rebuildPanel(ProcessList* this) {
|
||||||
|
|
||||||
if (this->following == -1) {
|
if (this->following == -1) {
|
||||||
/* If the last item was selected, keep the new last item selected */
|
/* 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);
|
Panel_setSelected(this->panel, Panel_size(this->panel) - 1);
|
||||||
else
|
else
|
||||||
Panel_setSelected(this->panel, currPos);
|
Panel_setSelected(this->panel, currPos);
|
||||||
|
|
Loading…
Reference in New Issue