mirror of https://github.com/xzeldon/htop.git
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…
Reference in New Issue