Kaydet (Commit) 66b93d2d authored tarafından Colomban Wendling's avatar Colomban Wendling

Fix "mark all" search feature when using regular expressions

Use the proper, full-featured, regular expression engine we use
everywhere else rather than Scintilla's stripped-down one.

Closes #3564132.
üst 69d8295c
......@@ -3,6 +3,9 @@ Geany 1.23 (unreleased)
Editor
* Update Scintilla to version 3.2.1 (#3540469).
Search
* 'Mark All' now also uses the fully-featured PCRE engine (#3564132).
Geany 1.22 (June 18, 2012)
......
......@@ -1177,7 +1177,7 @@ gint search_mark_all(GeanyDocument *doc, const gchar *search_text, gint flags)
ttf.lpstrText = (gchar *)search_text;
while (TRUE)
{
pos = sci_find_text(doc->editor->sci, flags, &ttf);
pos = search_find_text(doc->editor->sci, flags, &ttf);
if (pos == -1) break;
len = ttf.chrgText.cpMax - ttf.chrgText.cpMin;
......@@ -1185,6 +1185,9 @@ gint search_mark_all(GeanyDocument *doc, const gchar *search_text, gint flags)
editor_indicator_set_on_range(doc->editor, GEANY_INDICATOR_SEARCH, pos, pos + len);
ttf.chrg.cpMin = ttf.chrgText.cpMax;
/* make sure to advance even with empty matches (see find_document_usage()) */
if (len == 0)
ttf.chrg.cpMin ++;
count++;
}
return count;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment