]> git.wh0rd.org Git - nano.git/commitdiff
- findnextstr() off by one with past_editbot.
authorAdam Rogoyski <rogoyski@cs.utexas.edu>
Sun, 9 Jul 2000 18:42:53 +0000 (18:42 +0000)
committerAdam Rogoyski <rogoyski@cs.utexas.edu>
Sun, 9 Jul 2000 18:42:53 +0000 (18:42 +0000)
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@97 35c25a1d-7b9e-4130-9fde-d3aeb78583b8

search.c

index a14cb60c60edfe8147934b872622f8ca5d897e73..41dcfdb523dd26097823263e47938a5e6e6d6b10 100644 (file)
--- a/search.c
+++ b/search.c
@@ -136,11 +136,11 @@ filestruct *findnextstr(int quiet, filestruct * begin, char *needle)
     /* Look for searchstr until EOF */
     while (fileptr != NULL &&
           (found = strstrwrapper(searchstr, needle)) == NULL) {
-       if (!past_editbot && (fileptr == editbot))
-           past_editbot = 1;
 
        fileptr = fileptr->next;
 
+       if (!past_editbot && (fileptr == editbot))
+           past_editbot = 1;
 
        if (fileptr == begin)
            return NULL;
@@ -179,8 +179,7 @@ filestruct *findnextstr(int quiet, filestruct * begin, char *needle)
            for (tmp = fileptr->data; tmp != found; tmp++)
                current_x++;
 
-           if (past_editbot)
-               edit_update(current);
+           edit_update(current);
            reset_cursor();
 
            if (!quiet)