From 45e1b6d8695f8c4211599d865959602367a779a1 Mon Sep 17 00:00:00 2001 From: Vito Caputo Date: Sat, 12 Apr 2025 20:00:00 -0700 Subject: charts: suppress "/~ThreadName" heading w/--no-threads If we're not showing the threads, the caption shouldn't mention it. --- src/charts.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/charts.c b/src/charts.c index 33ba014..f5ccab0 100644 --- a/src/charts.c +++ b/src/charts.c @@ -690,7 +690,8 @@ static void draw_columns(vwm_charts_t *charts, vwm_chart_t *chart, vwm_column_t case VWM_COLUMN_PROC_ARGV: { /* print the process' argv */ if (heading) { - str_len = snpf(str, sizeof(str), "[NThreads] ArgV/~ThreadName"); + str_len = snpf(str, sizeof(str), "[NThreads] ArgV%s", + charts->no_threads ? "" : "/~ThreadName"); str_justify = VWM_JUSTIFY_LEFT; } else { int width; -- cgit v1.2.3