mirror of
https://github.com/xzeldon/htop.git
synced 2025-07-13 12:44:34 +03:00
Merge branch 'hili-new-old' of adsr/htop into highlight-new-old-processes
This commit is contained in:
12
Panel.c
12
Panel.c
@ -273,16 +273,18 @@ void Panel_draw(Panel* this, bool focus) {
|
||||
Object_display(itemObj, &item);
|
||||
int itemLen = RichString_sizeVal(item);
|
||||
int amt = MINIMUM(itemLen - scrollH, this->w);
|
||||
bool selected = (i == this->selected);
|
||||
if (selected) {
|
||||
attrset(selectionColor);
|
||||
RichString_setAttr(&item, selectionColor);
|
||||
if (i == this->selected) {
|
||||
item.highlightAttr = selectionColor;
|
||||
}
|
||||
if (item.highlightAttr) {
|
||||
attrset(item.highlightAttr);
|
||||
RichString_setAttr(&item, item.highlightAttr);
|
||||
this->selectedLen = itemLen;
|
||||
}
|
||||
mvhline(y + line, x, ' ', this->w);
|
||||
if (amt > 0)
|
||||
RichString_printoffnVal(item, y + line, x, scrollH, amt);
|
||||
if (selected)
|
||||
if (item.highlightAttr)
|
||||
attrset(CRT_colors[RESET_COLOR]);
|
||||
RichString_end(item);
|
||||
line++;
|
||||
|
Reference in New Issue
Block a user