fix searching bug (was broken after first search)

This commit is contained in:
Daniel Micay 2012-05-22 04:25:22 -04:00
parent f5b0bebd42
commit 4bc8ec0d3e
1 changed files with 2 additions and 1 deletions

3
term.c
View File

@ -19,7 +19,8 @@ typedef struct search_dialog_info {
static void search_response_cb(GtkDialog *dialog, gint response_id, search_dialog_info *info) {
GRegex *regex = vte_terminal_search_get_gregex(VTE_TERMINAL(info->vte));
if (!regex) regex = g_regex_new(gtk_entry_get_text(GTK_ENTRY(info->entry)), 0, 0, NULL);
if (regex) g_regex_unref(regex);
regex = g_regex_new(gtk_entry_get_text(GTK_ENTRY(info->entry)), 0, 0, NULL);
vte_terminal_search_set_gregex(VTE_TERMINAL(info->vte), regex);
if (info->direction == search_forward) {