X-Git-Url: http://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=test%2Finserts.c;h=b858668af2a028043e90f55429d2805952ecb73f;hp=56b8ebe4834def846f5ff617d64194ea440412c7;hb=8554ac8f8bb70116fbc962f529168d273e950e2b;hpb=98d8891f42d8acac5c2ade39d163f386057a22e4 diff --git a/test/inserts.c b/test/inserts.c index 56b8ebe4..b858668a 100644 --- a/test/inserts.c +++ b/test/inserts.c @@ -26,7 +26,7 @@ * authorization. * ****************************************************************************/ /* - * $Id: inserts.c,v 1.24 2012/06/09 20:29:33 tom Exp $ + * $Id: inserts.c,v 1.25 2012/11/24 19:57:17 tom Exp $ * * Demonstrate the winsstr() and winsch functions. * Thomas Dickey - 2002/10/19 @@ -167,6 +167,15 @@ test_inserts(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 inserted in color, to distinguish from those + * that are shifted. + */ + if (has_colors()) { + start_color(); + init_pair(1, COLOR_WHITE, COLOR_BLUE); + } } limit = LINES - 5; @@ -200,13 +209,7 @@ test_inserts(int level) doupdate(); - /* - * Show the characters inserted in color, to distinguish from those that - * are shifted. - */ if (has_colors()) { - start_color(); - init_pair(1, COLOR_WHITE, COLOR_BLUE); wbkgdset(work, (chtype) (COLOR_PAIR(1) | ' ')); }