summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEugene Syromyatnikov <evgsyr@gmail.com>2023-04-04 21:51:54 +0200
committerEugene Syromyatnikov <evgsyr@gmail.com>2023-04-05 09:15:28 +0200
commit073622770ab823d57833ce81324314ca71755678 (patch)
treebfbfb66d57cd9b256db3988a06bdeadb9f8c6942
parente379badf6bf016b5b18359e0690caf8f8217f64e (diff)
downloadstrace-073622770ab823d57833ce81324314ca71755678.tar.gz
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"
-rw-r--r--src/strauss.c4
1 files 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)]);
}