Make search.c:on_replace_dialog_response() a little more readable

git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5797 ea778897-0a13-0410-b9d1-a72fbfd435f5
This commit is contained in:
Colomban Wendling 2011-05-17 13:47:36 +00:00
parent 36649da8d4
commit 6e6b4a61fc

View File

@ -1362,14 +1362,7 @@ on_replace_dialog_response(GtkDialog *dialog, gint response, gpointer user_data)
if ((response != GEANY_RESPONSE_FIND) && (search_flags_re & SCFIND_MATCHCASE)
&& (strcmp(find, replace) == 0))
{
fail:
utils_beep();
gtk_widget_grab_focus(replace_dlg.find_entry);
g_free(find);
g_free(replace);
return;
}
goto fail;
if (search_flags_re & SCFIND_REGEXP)
{
if (! utils_str_replace_escape(find, TRUE) ||
@ -1435,6 +1428,13 @@ on_replace_dialog_response(GtkDialog *dialog, gint response, gpointer user_data)
}
g_free(find);
g_free(replace);
return;
fail:
utils_beep();
gtk_widget_grab_focus(replace_dlg.find_entry);
g_free(find);
g_free(replace);
}