summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/imlib.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/imlib.c b/src/imlib.c
index e27db57..d12852c 100644
--- a/src/imlib.c
+++ b/src/imlib.c
@@ -562,7 +562,9 @@ void feh_draw_info(winwidget w)
}
else {
while ((no_lines < 20) && fgets(info_buf, 256, info_pipe)) {
- info_buf[strlen(info_buf)-1] = '\0';
+ if (info_buf[strlen(info_buf)-1] == '\n')
+ info_buf[strlen(info_buf)-1] = '\0';
+
gib_imlib_text_draw(im, fn, NULL, 2, (no_lines*th)+2, info_buf,
IMLIB_TEXT_TO_RIGHT, 0, 0, 0, 255);
gib_imlib_text_draw(im, fn, NULL, 1, (no_lines*th)+1, info_buf,