mirror of
https://github.com/MidnightCommander/mc
synced 2024-12-23 04:46:55 +03:00
mcedit: make backward search interruptible.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This commit is contained in:
parent
90c67f9220
commit
81a55537de
@ -869,17 +869,20 @@ editcmd_find (edit_search_status_msg_t * esm, gsize * len)
|
||||
|
||||
while (search_start >= start_mark)
|
||||
{
|
||||
gboolean ok;
|
||||
|
||||
if (search_end > (off_t) (search_start + edit->search->original_len)
|
||||
&& mc_search_is_fixed_search_str (edit->search))
|
||||
{
|
||||
search_end = search_start + edit->search->original_len;
|
||||
}
|
||||
if (mc_search_run (edit->search, (void *) esm, search_start, search_end, len)
|
||||
&& edit->search->normal_offset == search_start)
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
ok = mc_search_run (edit->search, (void *) esm, search_start, search_end, len);
|
||||
|
||||
if (ok && edit->search->normal_offset == search_start)
|
||||
return TRUE;
|
||||
|
||||
/* Abort search. */
|
||||
if (!ok && edit->search->error == MC_SEARCH_E_ABORT)
|
||||
return FALSE;
|
||||
|
||||
if ((edit->search_line_type & AT_START_LINE) != 0)
|
||||
search_start =
|
||||
|
Loading…
Reference in New Issue
Block a user