X-Git-Url: https://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=test%2Fins_wide.c;h=6e4e7275cdf6723f75db63e865f32a86640c19a8;hp=38ffd7637d00b27041110d85096ddb09abacfe3c;hb=64f44b13d30e0a7bc2921a9d43755423f81564fd;hpb=b6d0d9ad9e372e856f01a4c283cf784a15993903 diff --git a/test/ins_wide.c b/test/ins_wide.c index 38ffd763..6e4e7275 100644 --- a/test/ins_wide.c +++ b/test/ins_wide.c @@ -26,7 +26,7 @@ * authorization. * ****************************************************************************/ /* - * $Id: ins_wide.c,v 1.17 2012/06/09 20:29:33 tom Exp $ + * $Id: ins_wide.c,v 1.19 2012/12/09 01:13:56 tom Exp $ * * Demonstrate the wins_wstr() and wins_wch functions. * Thomas Dickey - 2002/11/23 @@ -242,6 +242,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; @@ -275,13 +284,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) | ' ')); } @@ -439,10 +442,10 @@ test_inserts(int level) } } if (level > 0) { - delwin(show); delwin(work); delwin(look); } + delwin(show); } static void