added disabling centered level info text if too long
authorHolger Schemel <holger.schemel@virtion.de>
Mon, 18 Nov 2024 19:25:17 +0000 (20:25 +0100)
committerHolger Schemel <holger.schemel@virtion.de>
Mon, 18 Nov 2024 19:25:17 +0000 (20:25 +0100)
src/screens.c

index e13a4f9bc79063c904bf0a9584a3acc66662d457..5794c2c663fd387581075769d0a203bf55c0cdfc 100644 (file)
@@ -1087,6 +1087,10 @@ static void addLineOrTextToInfoBuffer(char **buffer, char *header, char *text, b
   if (strlen(*buffer) > 0)
     appendStringPrint(buffer, "\n\n");
 
+  // do not use centered text if too long
+  if (strlen(text) > 80)
+    centered = FALSE;
+
   // header always centered
   appendStringPrint(buffer, "# .centered: true\n");