diff options
Diffstat (limited to 'src/fe-text/textbuffer.c')
-rw-r--r-- | src/fe-text/textbuffer.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/fe-text/textbuffer.c b/src/fe-text/textbuffer.c index f35848a2..979a6104 100644 --- a/src/fe-text/textbuffer.c +++ b/src/fe-text/textbuffer.c @@ -546,7 +546,7 @@ GList *textbuffer_find_text(TEXT_BUFFER_REC *buffer, LINE_REC *startline, preg = NULL; if (regexp) { - preg = g_regex_new(text, (case_sensitive ? 0 : G_REGEX_CASELESS), 0, NULL); + preg = g_regex_new(text, G_REGEX_RAW | (case_sensitive ? 0 : G_REGEX_CASELESS), 0, NULL); if (preg == NULL) return NULL; @@ -602,7 +602,7 @@ GList *textbuffer_find_text(TEXT_BUFFER_REC *buffer, LINE_REC *startline, } } - if (regexp) + if (preg != NULL) g_regex_unref(preg); g_string_free(str, TRUE); return matches; |