Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/lib/libform Reposition form cursor after field redrawn when ...



details:   https://anonhg.NetBSD.org/src/rev/e3658025f88e
branches:  trunk
changeset: 534626:e3658025f88e
user:      blymn <blymn%NetBSD.org@localhost>
date:      Wed Jul 31 01:28:32 2002 +0000

description:
Reposition form cursor after field redrawn when setting a field value,
since the field set may not be the current one.  This fixes PR 17533.

diffstat:

 lib/libform/field.c |  8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diffs (23 lines):

diff -r 09609e6e0ac7 -r e3658025f88e lib/libform/field.c
--- a/lib/libform/field.c       Wed Jul 31 00:47:55 2002 +0000
+++ b/lib/libform/field.c       Wed Jul 31 01:28:32 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: field.c,v 1.17 2002/07/29 05:17:37 blymn Exp $ */
+/*     $NetBSD: field.c,v 1.18 2002/07/31 01:28:32 blymn Exp $ */
 /*-
  * Copyright (c) 1998-1999 Brett Lymn
  *                         (blymn%baea.com.au@localhost, brett_lymn%yahoo.com.au@localhost)
@@ -351,8 +351,12 @@
                  /* redraw the field to reflect the new contents. If the field
                   * is attached....
                   */
-               if ((field->parent != NULL) && (field->parent->posted == 1))
+               if ((field->parent != NULL) && (field->parent->posted == 1)) {
                        _formi_redraw_field(field->parent, field->index);
+                         /* make sure cursor goes back to current field */
+                       pos_form_cursor(field->parent);
+               }
+               
        }
 
 #ifdef DEBUG



Home | Main Index | Thread Index | Old Index