From da1664f7447bcaae9b2035fceb4993f02e8d1dde Mon Sep 17 00:00:00 2001 From: William McBrine Date: Thu, 21 Jun 2007 06:54:50 +0000 Subject: [PATCH] Implicit wrefresh() from wgetch() also needs to be called if only the cursor was moved (and not in leaveok() mode). --- pdcurses/getch.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/pdcurses/getch.c b/pdcurses/getch.c index 5703b4ed..d5af9eb6 100644 --- a/pdcurses/getch.c +++ b/pdcurses/getch.c @@ -13,7 +13,7 @@ #include -RCSID("$Id: getch.c,v 1.67 2007/06/14 14:11:30 wmcbrine Exp $") +RCSID("$Id: getch.c,v 1.68 2007/06/21 06:54:50 wmcbrine Exp $") /*man-start************************************************************** @@ -194,10 +194,11 @@ int wgetch(WINDOW *win) waitcount = 1; } - /* wrs (7/31/93) -- System V curses refreshes window when wgetch - is called if there have been changes to it and it is not a pad */ + /* refresh window when wgetch is called if there have been + changes to it and it is not a pad */ - if (!(win->_flags & _PAD) && is_wintouched(win)) + if (!(win->_flags & _PAD) && ((!win->_leaveit && (win->_curx != + SP->curscol || win->_cury != SP->cursrow)) || is_wintouched(win))) wrefresh(win); /* if ungotten char exists, remove and return it */