Skip to content

Commit

Permalink
Let GRegex handle escape sequences itself
Browse files Browse the repository at this point in the history
  • Loading branch information
ntrel committed Dec 25, 2011
1 parent 21f0715 commit 773d7e4
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions src/search.c
Expand Up @@ -1236,9 +1236,9 @@ on_find_dialog_response(GtkDialog *dialog, gint response, gpointer user_data)
gtk_widget_grab_focus(find_dlg.entry);
return;
}
if (settings.find_escape_sequences || search_data.flags & SCFIND_REGEXP)
if (settings.find_escape_sequences && ~search_data.flags & SCFIND_REGEXP)
{
if (! utils_str_replace_escape(search_data.text, search_data.flags & SCFIND_REGEXP))
if (! utils_str_replace_escape(search_data.text, FALSE))
goto fail;
}
ui_combo_box_add_to_history(GTK_COMBO_BOX_ENTRY(user_data), search_data.original_text, 0);
Expand Down Expand Up @@ -1361,13 +1361,8 @@ on_replace_dialog_response(GtkDialog *dialog, gint response, gpointer user_data)

original_find = g_strdup(find);
original_replace = g_strdup(replace);
if (search_flags_re & SCFIND_REGEXP)
{
if (! utils_str_replace_escape(find, TRUE) ||
! utils_str_replace_escape(replace, TRUE))
goto fail;
}
else if (search_replace_escape_re)

if (search_replace_escape_re && ~search_flags_re & SCFIND_REGEXP)
{
if (! utils_str_replace_escape(find, FALSE) ||
! utils_str_replace_escape(replace, FALSE))
Expand Down

0 comments on commit 773d7e4

Please sign in to comment.