Ticket #3855: 3855.patch

File 3855.patch, 755 bytes (added by andrew_b, 5 years ago)
  • src/viewer/search.c

    diff --git a/src/viewer/search.c b/src/viewer/search.c
    index f2e2431..4538266 100644
    a b mcview_do_search (WView * view, off_t want_search_start) 
    378378    while (search_start > 0 && mcview_may_still_grow (view)); 
    379379 
    380380    /* After mcview_may_still_grow (view) == FALSE we have remained last chunk. Search there. */ 
    381     if (!found && view->search->error == MC_SEARCH_E_NOTFOUND && !mcview_search_options.backwards 
     381    if (view->growbuf_in_use && !found && view->search->error == MC_SEARCH_E_NOTFOUND 
     382        && !mcview_search_options.backwards 
    382383        && mcview_find (&vsm, search_start, mcview_get_filesize (view), &match_len)) 
    383384    { 
    384385        mcview_search_show_result (view, match_len);