diff options
author | Daniel Lange <DLange@git.local> | 2020-12-11 18:23:52 +0100 |
---|---|---|
committer | Daniel Lange <DLange@git.local> | 2020-12-11 18:58:09 +0100 |
commit | cdb702fe5a9835245c5182050b4232ddaeb5ac73 (patch) | |
tree | 8b2ae16b7789d81bd0dee54701c4e910dd7ce821 /debian/patches/0001-Fix-broken-tree-display.patch | |
parent | 6853bf4de72a92f969d566ab7313ae70827a6af2 (diff) | |
download | debian_htop-cdb702fe5a9835245c5182050b4232ddaeb5ac73.tar.gz debian_htop-cdb702fe5a9835245c5182050b4232ddaeb5ac73.tar.bz2 debian_htop-cdb702fe5a9835245c5182050b4232ddaeb5ac73.zip |
Prepare for 3.0.3-2
Diffstat (limited to 'debian/patches/0001-Fix-broken-tree-display.patch')
-rw-r--r-- | debian/patches/0001-Fix-broken-tree-display.patch | 78 |
1 files changed, 78 insertions, 0 deletions
diff --git a/debian/patches/0001-Fix-broken-tree-display.patch b/debian/patches/0001-Fix-broken-tree-display.patch new file mode 100644 index 0000000..a86ca74 --- /dev/null +++ b/debian/patches/0001-Fix-broken-tree-display.patch @@ -0,0 +1,78 @@ +From c2cc7e2f348c10c4c39dbce43861882e10ef1b4f Mon Sep 17 00:00:00 2001 +From: Daniel Lange <DLange@git.local> +Date: Fri, 11 Dec 2020 18:13:10 +0100 +Subject: [PATCH 1/2] Fix broken tree display + +upstream commits 4c44a70 and f6613db +--- + Process.c | 3 ++- + ProcessList.c | 15 ++++++--------- + linux/LinuxProcess.c | 3 ++- + 3 files changed, 10 insertions(+), 11 deletions(-) + +diff --git a/Process.c b/Process.c +index 8245f86..927731b 100644 +--- a/Process.c ++++ b/Process.c +@@ -320,7 +320,8 @@ void Process_writeField(const Process* this, RichString* str, ProcessField field + buf += written; + n -= written; + } +- const char* draw = CRT_treeStr[lastItem ? (this->settings->direction == 1 ? TREE_STR_BEND : TREE_STR_TEND) : TREE_STR_RTEE]; ++ ++ const char* draw = CRT_treeStr[lastItem ? TREE_STR_BEND : TREE_STR_RTEE]; + xSnprintf(buf, n, "%s%s ", draw, this->showChildren ? CRT_treeStr[TREE_STR_SHUT] : CRT_treeStr[TREE_STR_OPEN] ); + RichString_append(str, CRT_colors[PROCESS_TREE], buffer); + Process_writeCommand(this, attr, baseattr, str); +diff --git a/ProcessList.c b/ProcessList.c +index 2d27339..e3199d2 100644 +--- a/ProcessList.c ++++ b/ProcessList.c +@@ -479,23 +479,20 @@ void ProcessList_rebuildPanel(ProcessList* this) { + int size = ProcessList_size(this); + int idx = 0; + for (int i = 0; i < size; i++) { +- bool hidden = false; + Process* p = ProcessList_get(this, i); + + if ( (!p->show) + || (this->userId != (uid_t) -1 && (p->st_uid != this->userId)) + || (incFilter && !(String_contains_i(Process_getCommand(p), incFilter))) + || (this->pidMatchList && !Hashtable_get(this->pidMatchList, p->tgid)) ) +- hidden = true; ++ continue; + +- if (!hidden) { +- Panel_set(this->panel, idx, (Object*)p); +- if ((this->following == -1 && idx == currPos) || (this->following != -1 && p->pid == currPid)) { +- Panel_setSelected(this->panel, idx); +- this->panel->scrollV = currScrollV; +- } +- idx++; ++ Panel_set(this->panel, idx, (Object*)p); ++ if ((this->following == -1 && idx == currPos) || (this->following != -1 && p->pid == currPid)) { ++ Panel_setSelected(this->panel, idx); ++ this->panel->scrollV = currScrollV; + } ++ idx++; + } + } + +diff --git a/linux/LinuxProcess.c b/linux/LinuxProcess.c +index 8298000..62837cb 100644 +--- a/linux/LinuxProcess.c ++++ b/linux/LinuxProcess.c +@@ -605,8 +605,9 @@ static void LinuxProcess_writeCommandField(const Process *this, RichString *str, + buf = stpcpy(buf, " "); + } + } ++ + n -= (buf - buffer); +- const char* draw = CRT_treeStr[lastItem ? (this->settings->direction == 1 ? TREE_STR_BEND : TREE_STR_TEND) : TREE_STR_RTEE]; ++ const char* draw = CRT_treeStr[lastItem ? TREE_STR_BEND : TREE_STR_RTEE]; + xSnprintf(buf, n, "%s%s ", draw, this->showChildren ? CRT_treeStr[TREE_STR_SHUT] : CRT_treeStr[TREE_STR_OPEN] ); + RichString_append(str, CRT_colors[PROCESS_TREE], buffer); + LinuxProcess_writeCommand(this, attr, baseattr, str); +-- +2.25.1 + |