commit 46df7385ecf1d341b47fee506ded2e00bd3b73fa
parent b7df2713a6f5145d2f05ce09e00f8175dc7e45e5
Author: Samuel Dudik <samuel.dudik@gmail.com>
Date: Sat, 15 Aug 2020 08:56:41 +0200
Fix problem (with bitmap fonts) causing new lines to be printed
Diffstat:
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/herbe.c b/herbe.c
@@ -46,8 +46,10 @@ int get_max_len(char *body, XftFont *font, int max_text_width)
}
for (int i = 0; i < eol; i++)
- if (body[i] == '\n')
+ if (body[i] == '\n') {
+ body[i] = ' ';
return ++i;
+ }
if (info.width < max_text_width)
return eol;