From 311a3f217666744c8ce72093c37c58acf952c115 Mon Sep 17 00:00:00 2001 From: Holger Schemel Date: Wed, 14 Dec 2022 23:53:21 +0100 Subject: [PATCH] added forced line break support to auto-wrapped text output To add a line break to auto-wrapped text output (like level set info text files), use two spaces at the end of a line (like it is used in Markdown formatted text). --- src/libgame/text.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/libgame/text.c b/src/libgame/text.c index ce855daf..4de7319a 100644 --- a/src/libgame/text.c +++ b/src/libgame/text.c @@ -404,6 +404,9 @@ static boolean RenderLineToBuffer(char **src_buffer_ptr, char *dst_buffer, char *word_ptr; int word_len; + if (strEqual(text_ptr, " ")) // special case: force line break + buffer_filled = TRUE; + // skip leading whitespaces while (*text_ptr == ' ' || *text_ptr == '\t') text_ptr++; -- 2.34.1