[Xfce4-commits] [apps/xfce4-terminal] 01/01: Always use MULTILINE flag for PCRE2 regexes
noreply at xfce.org
noreply at xfce.org
Fri Sep 23 16:17:55 CEST 2016
This is an automated email from the git hooks/post-receive script.
f2404 pushed a commit to branch master
in repository apps/xfce4-terminal.
commit b695d88daff10556801ac809749c6e8f99082c68
Author: Igor <f2404 at yandex.ru>
Date: Fri Sep 23 17:15:24 2016 +0300
Always use MULTILINE flag for PCRE2 regexes
See https://git.gnome.org/browse/vte/commit/?id=4c0d8533051fb80999e886884f7fb2729c1a0c58
and https://git.gnome.org/browse/vte/commit/?id=b00caee60a757d354bf8d51678669c2eb426e086
---
terminal/terminal-search-dialog.c | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/terminal/terminal-search-dialog.c b/terminal/terminal-search-dialog.c
index ee8fa01..f7231d7 100644
--- a/terminal/terminal-search-dialog.c
+++ b/terminal/terminal-search-dialog.c
@@ -223,7 +223,7 @@ terminal_search_dialog_get_regex (TerminalSearchDialog *dialog,
{
const gchar *pattern;
#if VTE_CHECK_VERSION (0, 45, 90)
- guint32 flags = 0;
+ guint32 flags = PCRE2_UTF | PCRE2_NO_UTF_CHECK | PCRE2_MULTILINE;
#else
GRegexCompileFlags flags = G_REGEX_OPTIMIZE;
#endif
@@ -245,17 +245,18 @@ terminal_search_dialog_get_regex (TerminalSearchDialog *dialog,
if (!gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (dialog->match_case)))
#if VTE_CHECK_VERSION (0, 45, 90)
- flags += PCRE2_CASELESS;
+ flags |= PCRE2_CASELESS;
#else
flags |= G_REGEX_CASELESS;
#endif
if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (dialog->match_regex)))
-#if VTE_CHECK_VERSION (0, 45, 90)
- flags += PCRE2_MULTILINE;
-#else
- flags |= G_REGEX_MULTILINE;
+ {
+/* MULTILINE flag is always used for pcre2 */
+#if !VTE_CHECK_VERSION (0, 45, 90)
+ flags |= G_REGEX_MULTILINE;
#endif
+ }
else
{
pattern_escaped = g_regex_escape_string (pattern, -1);
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Xfce4-commits
mailing list