Module Name:    src
Committed By:   blymn
Date:           Mon Oct 25 06:25:19 UTC 2021

Modified Files:
        src/lib/libform: internals.c

Log Message:
Fix for PR lib/47398

Move cursor to end of the currently active field and sync the cursor
location so the cursor get positioned correctly when the form window
is refreshed.


To generate a diff of this commit:
cvs rdiff -u -r1.41 -r1.42 src/lib/libform/internals.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/libform/internals.c
diff -u src/lib/libform/internals.c:1.41 src/lib/libform/internals.c:1.42
--- src/lib/libform/internals.c:1.41	Tue Oct 19 21:22:20 2021
+++ src/lib/libform/internals.c	Mon Oct 25 06:25:18 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: internals.c,v 1.41 2021/10/19 21:22:20 blymn Exp $	*/
+/*	$NetBSD: internals.c,v 1.42 2021/10/25 06:25:18 blymn Exp $	*/
 
 /*-
  * Copyright (c) 1998-1999 Brett Lymn
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: internals.c,v 1.41 2021/10/19 21:22:20 blymn Exp $");
+__RCSID("$NetBSD: internals.c,v 1.42 2021/10/25 06:25:18 blymn Exp $");
 
 #include <limits.h>
 #include <ctype.h>
@@ -1688,6 +1688,12 @@ _formi_redraw_field(FORM *form, int fiel
 	}
 
 	wattrset(form->scrwin, cur->back);
+
+	cur = form->fields[form->cur_field];
+	wmove(form->scrwin, cur->form_row + cur->cursor_ypos,
+	    cur->form_col + cur->cursor_xpos);
+	wcursyncup(form->scrwin);
+
 	return;
 }
 

Reply via email to