- findnextstr() off by one with past_editbot.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@97 35c25a1d-7b9e-4130-9fde-d3aeb78583b8master
parent
635fae3ed0
commit
a966d991e6
5
search.c
5
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,7 +179,6 @@ filestruct *findnextstr(int quiet, filestruct * begin, char *needle)
|
|||
for (tmp = fileptr->data; tmp != found; tmp++)
|
||||
current_x++;
|
||||
|
||||
if (past_editbot)
|
||||
edit_update(current);
|
||||
reset_cursor();
|
||||
|
||||
|
|
Loading…
Reference in New Issue