Module Name: src
Committed By: kamil
Date: Wed Sep 26 18:51:45 UTC 2018
Modified Files:
src/lib/libcurses: move.c
Log Message:
According to POSIX moving the cursor in curses(3) touches the window
Mark the old and new lines as dirty, so they will be refreshed upon next
call to getch(3)-like routine.
This also matches the ncurses behavior.
Reviewed by <roy>
To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 src/lib/libcurses/move.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/lib/libcurses/move.c
diff -u src/lib/libcurses/move.c:1.18 src/lib/libcurses/move.c:1.19
--- src/lib/libcurses/move.c:1.18 Fri Jan 6 13:53:18 2017
+++ src/lib/libcurses/move.c Wed Sep 26 18:51:45 2018
@@ -1,4 +1,4 @@
-/* $NetBSD: move.c,v 1.18 2017/01/06 13:53:18 roy Exp $ */
+/* $NetBSD: move.c,v 1.19 2018/09/26 18:51:45 kamil Exp $ */
/*
* Copyright (c) 1981, 1993, 1994
@@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)move.c 8.2 (Berkeley) 5/4/94";
#else
-__RCSID("$NetBSD: move.c,v 1.18 2017/01/06 13:53:18 roy Exp $");
+__RCSID("$NetBSD: move.c,v 1.19 2018/09/26 18:51:45 kamil Exp $");
#endif
#endif /* not lint */
@@ -72,8 +72,10 @@ wmove(WINDOW *win, int y, int x)
return ERR;
win->curx = x;
win->alines[win->cury]->flags &= ~__ISPASTEOL;
+ win->alines[win->cury]->flags |= __ISDIRTY;
win->cury = y;
win->alines[y]->flags &= ~__ISPASTEOL;
+ win->alines[y]->flags |= __ISDIRTY;
return OK;
}