Ticket #3855: mcview: search doesn't ask about starting over

Broken in 178628e67f.

(mcview_do_search): do search in last chunk if data source is the
growing buffer only.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This commit is contained in:
Andrew Borodin 2017-09-26 12:56:05 +03:00
parent cb1be748d8
commit 1221900262

View File

@ -378,7 +378,8 @@ mcview_do_search (WView * view, off_t want_search_start)
while (search_start > 0 && mcview_may_still_grow (view));
/* After mcview_may_still_grow (view) == FALSE we have remained last chunk. Search there. */
if (!found && view->search->error == MC_SEARCH_E_NOTFOUND && !mcview_search_options.backwards
if (view->growbuf_in_use && !found && view->search->error == MC_SEARCH_E_NOTFOUND
&& !mcview_search_options.backwards
&& mcview_find (&vsm, search_start, mcview_get_filesize (view), &match_len))
{
mcview_search_show_result (view, match_len);