projects
/
rocksndiamonds.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a3563cf
)
added forced line break support to auto-wrapped text output
author
Holger Schemel
<info@artsoft.org>
Wed, 14 Dec 2022 22:53:21 +0000
(23:53 +0100)
committer
Holger Schemel
<info@artsoft.org>
Wed, 14 Dec 2022 22:58:05 +0000
(23:58 +0100)
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
patch
|
blob
|
history
diff --git
a/src/libgame/text.c
b/src/libgame/text.c
index ce855daf9604496ddc89287ae8cade95676f37b7..4de7319a7e131a6bf4a996cac727f5caaa506e40 100644
(file)
--- 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++;