[gnome-terminal] search: Reflect changes to pattern string
- From: Tomas Bzatek <tbzatek src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-terminal] search: Reflect changes to pattern string
- Date: Tue, 25 Jan 2011 17:38:09 +0000 (UTC)
commit bc4546204ab13ebc0e1f46ed438a2db7d66af465
Author: Tomas Bzatek <tbzatek redhat com>
Date: Tue Jan 25 18:34:56 2011 +0100
search: Reflect changes to pattern string
Some dialog options modify the pattern string, make sure to update
our GRegex instance.
Originally found in https://bugzilla.redhat.com/show_bug.cgi?id=669113
src/terminal-search-dialog.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/src/terminal-search-dialog.c b/src/terminal-search-dialog.c
index e299ae9..4a3bf9c 100644
--- a/src/terminal-search-dialog.c
+++ b/src/terminal-search-dialog.c
@@ -365,7 +365,8 @@ terminal_search_dialog_get_regex (GtkWidget *dialog)
g_free ((char *) old_pattern);
}
- if (!priv->regex || priv->regex_compile_flags != compile_flags) {
+ if (!priv->regex || priv->regex_compile_flags != compile_flags ||
+ g_strcmp0 (pattern, g_regex_get_pattern (priv->regex)) != 0) {
priv->regex_compile_flags = compile_flags;
if (priv->regex)
g_regex_unref (priv->regex);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]