summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorArjun P <arjunpitchanathan@gmail.com>2022-10-29 00:20:11 +0100
committerArjun P <arjunpitchanathan@gmail.com>2022-10-29 00:20:11 +0100
commit4fbda9df29f97b1762f68112f50b7f1e1817097f (patch)
treee37544bf21dfa74e311e075a825d33dac549e356 /src
parentede7d0a76aadbfb94ab868b738130d8f371d409b (diff)
proc tree: fix width threshold to match commit message and use and/or instead of &&, ||
Diffstat (limited to 'src')
-rw-r--r--src/btop_draw.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/btop_draw.cpp b/src/btop_draw.cpp
index 48a434d..4ea14f9 100644
--- a/src/btop_draw.cpp
+++ b/src/btop_draw.cpp
@@ -1473,8 +1473,8 @@ namespace Proc {
out += c_color + uresize(p.name, width_left - 1) + end + ' ';
width_left -= (ulen(p.name) + 1);
}
- if (width_left > 30 || (width_left > 7 && p.short_cmd != p.name)) {
- out += g_color + '(' + uresize(width_left > 30 ? p.cmd : p.short_cmd, width_left - 3, p_wide_cmd[p.pid]) + ") ";
+ if (width_left > 40 or (width_left > 7 and p.short_cmd != p.name)) {
+ out += g_color + '(' + uresize(width_left > 40 ? p.cmd : p.short_cmd, width_left - 3, p_wide_cmd[p.pid]) + ") ";
width_left -= (ulen(p.short_cmd, true) + 3);
}
out += string(max(0, width_left), ' ') + Mv::to(y+2+lc, x+2+tree_size);