mirror of
https://github.com/xzeldon/htop.git
synced 2025-04-05 10:57:07 +03:00
Fix moving of meters
This commit is contained in:
parent
fd5dd6605a
commit
f187be9296
@ -171,6 +171,7 @@ static HandlerResult MetersPanel_eventHandler(Panel* super, int ch) {
|
|||||||
Vector_remove(this->meters, selected);
|
Vector_remove(this->meters, selected);
|
||||||
Panel_remove(super, selected);
|
Panel_remove(super, selected);
|
||||||
}
|
}
|
||||||
|
MetersPanel_setMoving(this, false);
|
||||||
result = HANDLED;
|
result = HANDLED;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
2
Panel.c
2
Panel.c
@ -256,7 +256,7 @@ void Panel_setSelected(Panel* this, int selected) {
|
|||||||
|
|
||||||
int size = Vector_size(this->items);
|
int size = Vector_size(this->items);
|
||||||
if (selected >= size) {
|
if (selected >= size) {
|
||||||
return;
|
selected = size - 1;
|
||||||
}
|
}
|
||||||
if (selected < 0)
|
if (selected < 0)
|
||||||
selected = 0;
|
selected = 0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user