mirror of
https://github.com/xzeldon/htop.git
synced 2024-12-24 23:15:46 +00:00
parent
265a7b8a50
commit
8c99683b04
@ -417,7 +417,7 @@ void Process_makeCommandStr(Process* this) {
|
||||
return;
|
||||
if (this->state == ZOMBIE && !this->mergedCommand.str)
|
||||
return;
|
||||
if (Process_isUserlandThread(this) && settings->showThreadNames && (showThreadNames == mc->prevShowThreadNames))
|
||||
if (Process_isUserlandThread(this) && settings->showThreadNames && (showThreadNames == mc->prevShowThreadNames) && (mc->prevMergeSet == showMergedCommand))
|
||||
return;
|
||||
|
||||
/* this->mergedCommand.str needs updating only if its state or contents changed.
|
||||
@ -516,11 +516,14 @@ void Process_makeCommandStr(Process* this) {
|
||||
assert(cmdlineBasenameStart <= (int)strlen(cmdline));
|
||||
|
||||
if (!showMergedCommand || !procExe || !procComm) { /* fall back to cmdline */
|
||||
if (showMergedCommand && (!Process_isUserlandThread(this) || showThreadNames) && !procExe && procComm && strlen(procComm)) { /* Prefix column with comm */
|
||||
if ((showMergedCommand || (Process_isUserlandThread(this) && showThreadNames)) && procComm && strlen(procComm)) { /* set column to or prefix it with comm */
|
||||
if (strncmp(cmdline + cmdlineBasenameStart, procComm, MINIMUM(TASK_COMM_LEN - 1, strlen(procComm))) != 0) {
|
||||
WRITE_HIGHLIGHT(0, strlen(procComm), commAttr, CMDLINE_HIGHLIGHT_FLAG_COMM);
|
||||
str = stpcpy(str, procComm);
|
||||
|
||||
if(!showMergedCommand)
|
||||
return;
|
||||
|
||||
WRITE_SEPARATOR;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user