X-Git-Url: http://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=test%2Ftest_addchstr.c;h=cc3dc4978cc172efb6ac22ac5a69bc866954a270;hp=6b4093e745b7369bd2d0bdbc151dc70e5d35e3ac;hb=8554ac8f8bb70116fbc962f529168d273e950e2b;hpb=98d8891f42d8acac5c2ade39d163f386057a22e4 diff --git a/test/test_addchstr.c b/test/test_addchstr.c index 6b4093e7..cc3dc497 100644 --- a/test/test_addchstr.c +++ b/test/test_addchstr.c @@ -26,7 +26,7 @@ * authorization. * ****************************************************************************/ /* - * $Id: test_addchstr.c,v 1.15 2012/10/27 19:31:42 tom Exp $ + * $Id: test_addchstr.c,v 1.16 2012/11/24 19:51:05 tom Exp $ * * Demonstrate the waddchstr() and waddch functions. * Thomas Dickey - 2009/9/12 @@ -239,6 +239,15 @@ test_adds(int level) (void) cbreak(); /* take input chars one at a time, no wait for \n */ (void) noecho(); /* don't echo input */ keypad(stdscr, TRUE); + + /* + * Show the characters added in color, to distinguish from those that + * are shifted. + */ + if (has_colors()) { + start_color(); + init_pair(1, COLOR_WHITE, COLOR_BLUE); + } } limit = LINES - 5; @@ -272,13 +281,7 @@ test_adds(int level) doupdate(); - /* - * Show the characters added in color, to distinguish from those that - * are shifted. - */ if (has_colors()) { - start_color(); - init_pair(1, COLOR_WHITE, COLOR_BLUE); show_attr = (attr_t) COLOR_PAIR(1); wbkgdset(work, show_attr | ' '); } else {