check response_id in search_response_cb
This commit is contained in:
parent
72aecb23f0
commit
a1768c4094
2
term.c
2
term.c
|
@ -18,6 +18,7 @@ typedef struct search_dialog_info {
|
|||
} search_dialog_info;
|
||||
|
||||
static void search_response_cb(GtkDialog *dialog, gint response_id, search_dialog_info *info) {
|
||||
if (response_id == GTK_RESPONSE_ACCEPT) {
|
||||
GRegex *regex = vte_terminal_search_get_gregex(VTE_TERMINAL(info->vte));
|
||||
if (regex) g_regex_unref(regex);
|
||||
regex = g_regex_new(gtk_entry_get_text(GTK_ENTRY(info->entry)), 0, 0, NULL);
|
||||
|
@ -28,6 +29,7 @@ static void search_response_cb(GtkDialog *dialog, gint response_id, search_dialo
|
|||
} else {
|
||||
vte_terminal_search_find_previous(VTE_TERMINAL(info->vte));
|
||||
}
|
||||
}
|
||||
|
||||
free(info);
|
||||
gtk_widget_destroy(GTK_WIDGET(dialog));
|
||||
|
|
Loading…
Reference in New Issue