pinosaur
/
smdp.git
/ commitdiff
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9adad15
)
remove unnecessary blanks at the output
author
Michael Göhler
<somebody.here@gmx.de>
Wed, 25 Mar 2015 23:59:26 +0000
(
00:59
+0100)
committer
Michael Göhler
<somebody.here@gmx.de>
Wed, 25 Mar 2015 23:59:26 +0000
(
00:59
+0100)
src/viewer.c
patch
|
blob
|
history
diff --git
a/src/viewer.c
b/src/viewer.c
index
5ca04a5
..
97e62df
100644
(file)
--- 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)