From 772a389a051586fd8793ce56e2ed865dfdfe12c5 Mon Sep 17 00:00:00 2001 From: xplshn <114888778+xplshn@users.noreply.github.com> Date: Tue, 27 Feb 2024 06:35:12 +0000 Subject: [PATCH] Polish truncate functions. --- bigdl | Bin 5031320 -> 5031320 bytes helperFunctions.go | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/bigdl b/bigdl index ea4c769c35d89cf924d1822c9ff11650e691d889..5902ddc2e32de246c86c52fe5d7d2bb92e883162 100644 GIT binary patch delta 575 zcmbWxJx>#H0Dy5?5CoBeKn34GKt-Y6Yya(`h^6JF6v_Ys?b2|)UI|x2EHyTcns|fG z_BOtNgN?(*PvNSQiSZM3Gcl=;UxDE_KFQ;~{}S}@`BP};)q2`4)Q++{r}3(3=J)oT z{gkwQl21nK>ekkgQLH~-6}if8S;|B!S^c${wGC4-j&ld*_CZW47i+abK_oIS#IuvK zS&77Ub8p)rw;c)~h)#6j0=m(Ii|9okE}+nDm(p=s||;IHeorZIy%xQlz3#eF=$9Oe`LxveA$nZ8Th~zAW|qQIpEMvB_%3o8`eo z_LdCs@K$B(RJmQdq$%*0Ap9o%FX<@JI0DvG)7C&z(Fs aPMhh7d)7>2!#`_g#y+?LRZUa1p26T8fmU7D6{UL`3os_9q>sy;!`E=}P ztr*+Mel$$&bJK4({T_I613t8(4L5NM?dU)!y3mc=xNduJ2X}D~z34*#_YuScJj5gP zV*rmah#@?|Q@80Kc7A#O+D>B_&+r^C@Dd|5ml5#F%ni( zQ&o#*B5H=ihKR&eLx^}nR~5BnmUL6mYh9K+=!;GYxh7e1U%=FND@Mm3F&8-r4wYMu zlRaACN5d{yG8CwYB8E5;n8XyOF@x8b#T#fyVh;0Iz#^8Aatl`a`@Hwcd$uG0{@-Wc d^>eLUPlxRDdK$~_c|8;S;wiY_W>$XM{{TVn;4J_E diff --git a/helperFunctions.go b/helperFunctions.go index c3a5f9c..9a0fa57 100644 --- a/helperFunctions.go +++ b/helperFunctions.go @@ -260,7 +260,7 @@ func truncateSprintf(format string, a ...interface{}) string { formatted := fmt.Sprintf(format, a...) // Determine the truncation length & truncate the formatted string if it exceeds the available space - availableSpace := getTerminalWidth() - 3 + availableSpace := getTerminalWidth() - 4 if len(formatted) > availableSpace { formatted = fmt.Sprintf("%s", formatted[:availableSpace]) for strings.HasSuffix(formatted, ",") || strings.HasSuffix(formatted, ".") || strings.HasSuffix(formatted, " ") {