(edit_search_cmd): get rid of code duplication.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This commit is contained in:
Andrew Borodin 2021-05-22 14:14:27 +03:00
parent 21feb38a8d
commit 7bc1b19676

View File

@ -2876,21 +2876,16 @@ edit_search_cmd (WEdit * edit, gboolean again)
history = g_list_first (history);
g_list_free_full (history, g_free);
if (!edit_search_init (edit, edit->last_search_string))
if (edit_search_init (edit, edit->last_search_string))
{
/* if not... then ask for an expression */
MC_PTR_FREE (edit->last_search_string);
edit_search (edit);
}
else
edit_do_search (edit);
return;
}
}
else
{
/* if not... then ask for an expression */
MC_PTR_FREE (edit->last_search_string);
edit_search (edit);
}
/* if not... then ask for an expression */
MC_PTR_FREE (edit->last_search_string);
edit_search (edit);
}
}