mirror of https://github.com/xzeldon/htop.git
parent
94d7f0b585
commit
5359eae28b
13
Process.c
13
Process.c
|
@ -363,15 +363,14 @@ void Process_writeField(const Process* this, RichString* str, ProcessField field
|
||||||
case USER: {
|
case USER: {
|
||||||
if (Process_getuid != this->st_uid)
|
if (Process_getuid != this->st_uid)
|
||||||
attr = CRT_colors[PROCESS_SHADOW];
|
attr = CRT_colors[PROCESS_SHADOW];
|
||||||
|
|
||||||
if (this->user) {
|
if (this->user) {
|
||||||
xSnprintf(buffer, n, "%-9s ", this->user);
|
int c = RichString_appendnWide(str, attr, this->user, MINIMUM(9, strlen(this->user)));
|
||||||
} else {
|
RichString_appendChr(str, ' ', 10 - c);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
xSnprintf(buffer, n, "%-9d ", this->st_uid);
|
xSnprintf(buffer, n, "%-9d ", this->st_uid);
|
||||||
}
|
|
||||||
if (buffer[9] != '\0') {
|
|
||||||
buffer[9] = ' ';
|
|
||||||
buffer[10] = '\0';
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
|
|
Loading…
Reference in New Issue