diff options
Diffstat (limited to 'test/redraw.c')
-rw-r--r-- | test/redraw.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/test/redraw.c b/test/redraw.c index 569c276..b0840fb 100644 --- a/test/redraw.c +++ b/test/redraw.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2020 Thomas E. Dickey * + * Copyright 2020,2021 Thomas E. Dickey * * Copyright 2006-2012,2017 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -27,7 +27,7 @@ * authorization. * ****************************************************************************/ /* - * $Id: redraw.c,v 1.11 2020/02/02 23:34:34 tom Exp $ + * $Id: redraw.c,v 1.13 2021/06/17 21:26:02 tom Exp $ * * Demonstrate the redrawwin() and wredrawln() functions. * Thomas Dickey - 2006/11/4 @@ -82,7 +82,6 @@ test_redraw(WINDOW *win) WINDOW *win1; WINDOW *win2; bool done = FALSE; - int ch, y, x; int max_y, max_x; int beg_y, beg_x; @@ -92,8 +91,11 @@ test_redraw(WINDOW *win) keypad(win, TRUE); getmaxyx(win, max_y, max_x); getbegyx(win, beg_y, beg_x); + while (!done) { - ch = wgetch(win); + int ch = wgetch(win); + int y, x; + getyx(win, y, x); switch (ch) { case 'q': @@ -133,7 +135,7 @@ test_redraw(WINDOW *win) /* * For a shell command, we can work around the problem noted above * using mvcur(). It is ifdef'd for NCURSES, since X/Open does - * not define the case where the old location is unknown. + * not define the case where the old location is unknown. */ IGNORE_RC(system("date")); mvcur(-1, -1, y, x); |