From: Adam Rogoyski Date: Sun, 9 Jul 2000 18:42:53 +0000 (+0000) Subject: - findnextstr() off by one with past_editbot. X-Git-Tag: v0.9.13~17 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=a966d991e68ddc2a2c7274142ad1ee8c0f1b7f91;p=nano.git - findnextstr() off by one with past_editbot. git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@97 35c25a1d-7b9e-4130-9fde-d3aeb78583b8 --- diff --git a/search.c b/search.c index a14cb60c..41dcfdb5 100644 --- 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)