summaryrefslogtreecommitdiffstats
path: root/htop.c
diff options
context:
space:
mode:
authorDaniel Lange <DLange@git.local>2020-11-24 15:51:53 +0100
committerDaniel Lange <DLange@git.local>2020-11-24 15:53:36 +0100
commit95f553b10c3276c731bb7e3d9a917e9d98322e85 (patch)
treeea47c9244b51947194b18847e80a357fd034fd87 /htop.c
parent952ee9cd779f7c730ca2747909d8ae861483c88c (diff)
Move treeView setting to make status bar item correct when using --sort-key, patch from @cgzones
Closes #340
Diffstat (limited to 'htop.c')
-rw-r--r--htop.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/htop.c b/htop.c
index fb919027..0a2401ca 100644
--- a/htop.c
+++ b/htop.c
@@ -298,6 +298,11 @@ int main(int argc, char** argv) {
settings->highlightChanges = true;
if (flags.highlightDelaySecs != -1)
settings->highlightDelaySecs = flags.highlightDelaySecs;
+ if (flags.sortKey > 0) {
+ settings->sortKey = flags.sortKey;
+ settings->treeView = false;
+ settings->direction = 1;
+ }
CRT_init(settings->delay, settings->colorScheme, flags.allowUnicode);
@@ -306,11 +311,6 @@ int main(int argc, char** argv) {
MainPanel_updateTreeFunctions(panel, settings->treeView);
- if (flags.sortKey > 0) {
- settings->sortKey = flags.sortKey;
- settings->treeView = false;
- settings->direction = 1;
- }
ProcessList_printHeader(pl, Panel_getHeader((Panel*)panel));
State state = {

© 2014-2024 Faster IT GmbH | imprint | privacy policy