Source-Changes-HG archive

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

[src/trunk]: src/lib/libform Reset offsets when a new field is entered.



details:   https://anonhg.NetBSD.org/src/rev/a03b3f23ee8f
branches:  trunk
changeset: 503221:a03b3f23ee8f
user:      blymn <blymn%NetBSD.org@localhost>
date:      Sat Feb 03 12:33:17 2001 +0000

description:
Reset offsets when a new field is entered.

diffstat:

 lib/libform/driver.c |  11 ++++++++++-
 1 files changed, 10 insertions(+), 1 deletions(-)

diffs (32 lines):

diff -r 5331379ff39a -r a03b3f23ee8f lib/libform/driver.c
--- a/lib/libform/driver.c      Sat Feb 03 09:19:45 2001 +0000
+++ b/lib/libform/driver.c      Sat Feb 03 12:33:17 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: driver.c,v 1.4 2001/01/30 06:44:42 blymn Exp $ */
+/*     $NetBSD: driver.c,v 1.5 2001/02/03 12:33:17 blymn Exp $ */
 
 /*-
  * Copyright (c) 1998-1999 Brett Lymn
@@ -146,6 +146,7 @@
                                if (status != E_OK)
                                        return status;
                                old_field = form->cur_field;
+                               fieldp = form->fields[form->cur_field];
                                goto next_field;
                        }
                        
@@ -412,6 +413,14 @@
                   */
                if (status != E_OK)
                        return status;
+
+                 /* if we have no error, reset the various offsets */
+               fieldp = form->fields[form->cur_field];
+               fieldp->start_char = 0;
+               fieldp->start_line = 0;
+               fieldp->hscroll = 0;
+               fieldp->cursor_xpos = 0;
+               fieldp->cursor_ypos = 0;
        }
        
        if (update_field < 0)



Home | Main Index | Thread Index | Old Index