From 51b2a847fc5798c5b0f56ae93f6e1355038df840 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Michael=20G=C3=B6hler?= Date: Thu, 26 Mar 2015 00:59:26 +0100 Subject: [PATCH] remove unnecessary blanks at the output --- src/viewer.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/viewer.c b/src/viewer.c index 5ca04a5..97e62df 100644 --- a/src/viewer.c +++ b/src/viewer.c @@ -633,8 +633,11 @@ void add_line(WINDOW *window, int y, int x, line_t *line, int max_cols, int colo } // fill rest off line with spaces - for(i = getcurx(window) - x; i < max_cols; i++) - wprintw(window, "%s", " "); + // we only need this if the color is inverted (e.g. code-blocks), + // to ensure the background fades too + if(CHECK_BIT(line->bits, IS_CODE)) + for(i = getcurx(window) - x; i < max_cols; i++) + wprintw(window, "%s", " "); // reset to default color if(colors) -- 2.20.1