Commit a966d991 authored by Adam Rogoyski's avatar Adam Rogoyski
Browse files

- findnextstr() off by one with past_editbot.

git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@97 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
parent 635fae3e
Showing with 3 additions and 4 deletions
+3 -4
...@@ -136,11 +136,11 @@ filestruct *findnextstr(int quiet, filestruct * begin, char *needle) ...@@ -136,11 +136,11 @@ filestruct *findnextstr(int quiet, filestruct * begin, char *needle)
/* Look for searchstr until EOF */ /* Look for searchstr until EOF */
while (fileptr != NULL && while (fileptr != NULL &&
(found = strstrwrapper(searchstr, needle)) == NULL) { (found = strstrwrapper(searchstr, needle)) == NULL) {
if (!past_editbot && (fileptr == editbot))
past_editbot = 1;
fileptr = fileptr->next; fileptr = fileptr->next;
if (!past_editbot && (fileptr == editbot))
past_editbot = 1;
if (fileptr == begin) if (fileptr == begin)
return NULL; return NULL;
...@@ -179,8 +179,7 @@ filestruct *findnextstr(int quiet, filestruct * begin, char *needle) ...@@ -179,8 +179,7 @@ filestruct *findnextstr(int quiet, filestruct * begin, char *needle)
for (tmp = fileptr->data; tmp != found; tmp++) for (tmp = fileptr->data; tmp != found; tmp++)
current_x++; current_x++;
if (past_editbot) edit_update(current);
edit_update(current);
reset_cursor(); reset_cursor();
if (!quiet) if (!quiet)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment