Ticket #2091: Superfluous "Search done, Continue from begining?" dialog

When searching from the top of the file for something that's not there we get
"Search done, Continue from begining?" dialog before "Search string not found"
(and only if we choose "Yes" in the first one).

This should happen only if the last position>0 (either the place when search
began, or some match before).

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
This commit is contained in:
Slava Zanko 2010-03-17 11:23:55 +02:00
parent 44fb2f37c4
commit 5610bfbb6c

View File

@ -277,7 +277,7 @@ mcview_do_search (mcview_t * view)
}
while (mcview_may_still_grow (view));
if (!isFound && need_search_again && !mcview_search_options.backwards)
if (view->search_start != 0 && !isFound && need_search_again && !mcview_search_options.backwards)
{
int result;
mcview_update (view);