X-Git-Url: https://git.danieliu.xyz/?a=blobdiff_plain;f=src%2Fviewer.c;h=d106a6221929a56e98a0d6da5d711d49c91726ef;hb=f49286fb39ff984f8fdbae7a890445a3e921aebb;hp=43a0733df2a360f7cacd2902acf53be1662bc038;hpb=b17ed569c4a9c22ef75bd6ffaf4a50a9bb8ec379;p=smdp.git diff --git a/src/viewer.c b/src/viewer.c index 43a0733..d106a62 100644 --- a/src/viewer.c +++ b/src/viewer.c @@ -2,7 +2,7 @@ * Functions necessary to display a deck of slides in different color modes * using ncurses. Only white, red, and blue are supported, as they can be * faded in 256 color mode. - * Copyright (C) 2015 Michael Goehler + * Copyright (C) 2016 Michael Goehler * * This file is part of mdp. * @@ -520,7 +520,8 @@ void add_line(WINDOW *window, int y, int x, line_t *line, int max_cols, int colo // fill rest off line with spaces if we are in a code block if(CHECK_BIT(line->bits, IS_CODE) && colors) { - wattron(window, COLOR_PAIR(CP_BLACK)); + if(colors) + wattron(window, COLOR_PAIR(CP_BLACK)); for(i = getcurx(window) - x; i < max_cols; i++) wprintw(window, "%s", " "); }