mirror of
https://github.com/xzeldon/htop.git
synced 2025-07-12 12:14:36 +03:00
Add -p flag, contributed by Rob Hoelz
This commit is contained in:
6
Panel.c
6
Panel.c
@ -250,7 +250,11 @@ void Panel_draw(Panel* this, bool focus) {
|
||||
int scrollH = this->scrollH;
|
||||
int y = this->y; int x = this->x;
|
||||
int first = this->scrollV;
|
||||
int last = MIN(itemCount, this->scrollV + MIN(itemCount, this->h));
|
||||
if (itemCount > this->h && first > itemCount - this->h) {
|
||||
first = itemCount - this->h;
|
||||
this->scrollV = first;
|
||||
}
|
||||
int last = MIN(itemCount, first + MIN(itemCount, this->h));
|
||||
if (this->selected < first) {
|
||||
first = this->selected;
|
||||
this->scrollV = first;
|
||||
|
Reference in New Issue
Block a user