From b488c4bb8bf5acebbe754b0f5e43c550a7371c5e Mon Sep 17 00:00:00 2001 From: Eugene Syromyatnikov Date: Tue, 4 Apr 2023 21:51:54 +0200 Subject: strauss: rely on strace--tips test instead of forcibly trimming lines The regression introduced in commit v5.19~99 "strauss: tips whitespace and phrasing cleanups" (and subsequently fixed in v6.2-6-g5b4f05f42 "strauss: add missing line separators") highlights the issue with the current approach with respect to tips formatting: it masks the issues related to overlong lines in favor to the pretty formatting; however, the presence of a (working) strace--tips test, that checks the correctness of the tips rendering, makes this trimming superfluous. Drop it and rely on the testing with respect to the guaranteeing the proper wrapping of (overly) long tip lines. * src/strauss.c (print_totd): Do not provide precision to the format specification that prints tip line. References: v6.2-6-g5b4f05f42 "strauss: add missing line separators" --- src/strauss.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/strauss.c b/src/strauss.c index 1b6d8d419..ce30823d9 100644 --- a/src/strauss.c +++ b/src/strauss.c @@ -369,9 +369,9 @@ print_totd(void) for (i = 0; (i < MAX_TIP_LINES) && (tips_tricks_tweaks[id][i] || (i < (ARRAY_SIZE(tip_right) - 1))); i++) { - fprintf(stderr, "%s%-*.*s%s%s\n", + fprintf(stderr, "%s%-*s%s%s\n", tip_left[MIN(i + 1, ARRAY_SIZE(tip_left) - 1)], - w, w, tips_tricks_tweaks[id][i] ?: "", + w, tips_tricks_tweaks[id][i] ?: "", tip_right[MIN(i + 1, ARRAY_SIZE(tip_right) - 1)], strauss[MIN(3 + i, strauss_lines - 1)]); } -- cgit v1.2.1