Module Name:    src
Committed By:   blymn
Date:           Wed Apr 27 22:04:04 UTC 2022

Modified Files:
        src/lib/libcurses: move.c

Log Message:
Fix for PR 56243
clear the past EOL flags when moving the cursor - they are no longer
valid as move cannot put the cursor past the EOL.


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 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.23 src/lib/libcurses/move.c:1.24
--- src/lib/libcurses/move.c:1.23	Tue Oct 19 06:41:03 2021
+++ src/lib/libcurses/move.c	Wed Apr 27 22:04:04 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: move.c,v 1.23 2021/10/19 06:41:03 blymn Exp $	*/
+/*	$NetBSD: move.c,v 1.24 2022/04/27 22:04:04 blymn 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.23 2021/10/19 06:41:03 blymn Exp $");
+__RCSID("$NetBSD: move.c,v 1.24 2022/04/27 22:04:04 blymn Exp $");
 #endif
 #endif				/* not lint */
 
@@ -68,6 +68,10 @@ wmove(WINDOW *win, int y, int x)
 	if (x >= win->maxx || y >= win->maxy)
 		return ERR;
 
+	/* clear the EOL flags for both where we were and where we are going */
+	win->alines[win->cury]->flags &= ~ __ISPASTEOL;
+	win->alines[y]->flags &= ~ __ISPASTEOL;
+
 	win->curx = x;
 	win->cury = y;
 

Reply via email to