From 46df7385ecf1d341b47fee506ded2e00bd3b73fa Mon Sep 17 00:00:00 2001 From: Samuel Dudik Date: Sat, 15 Aug 2020 08:56:41 +0200 Subject: [PATCH] Fix problem (with bitmap fonts) causing new lines to be printed --- herbe.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/herbe.c b/herbe.c index 6aa8dfc..fa62a49 100644 --- 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;