(edit_do_search): refactoring of search loop condition.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This commit is contained in:
Andrew Borodin 2012-08-08 14:41:06 +04:00
parent e42db716ca
commit 44de5a893f

View File

@ -1046,10 +1046,8 @@ edit_do_search (WEdit * edit)
search_create_bookmark = FALSE;
book_mark_flush (edit, -1);
while (TRUE)
while (mc_search_run (edit->search, (void *) edit, q, edit->last_byte, &len))
{
if (!mc_search_run (edit->search, (void *) edit, q, edit->last_byte, &len))
break;
if (found == 0)
edit->search_start = edit->search->normal_offset;
found++;