diff --git a/src/search.c b/src/search.c index 0b9cab19..0c2439ce 100644 --- a/src/search.c +++ b/src/search.c @@ -2031,20 +2031,7 @@ static gint find_regex(ScintillaObject *sci, guint pos, GRegex *regex, GeanyMatc } -gint search_find_prev(ScintillaObject *sci, const gchar *str, gint flags, GeanyMatchInfo **match_) -{ - gint ret; - - g_return_val_if_fail(! (flags & GEANY_FIND_REGEXP), -1); - - ret = sci_search_prev(sci, flags, str); - if (ret != -1 && match_) - *match_ = match_info_new(flags, ret, ret + strlen(str)); - return ret; -} - - -static gint geany_find_flags_to_sci_flags(gint flags) +static gint geany_find_flags_to_sci_flags(GeanyFindFlags flags) { g_warn_if_fail(! (flags & GEANY_FIND_MULTILINE)); @@ -2055,6 +2042,19 @@ static gint geany_find_flags_to_sci_flags(gint flags) } +gint search_find_prev(ScintillaObject *sci, const gchar *str, gint flags, GeanyMatchInfo **match_) +{ + gint ret; + + g_return_val_if_fail(! (flags & GEANY_FIND_REGEXP), -1); + + ret = sci_search_prev(sci, geany_find_flags_to_sci_flags(flags), str); + if (ret != -1 && match_) + *match_ = match_info_new(flags, ret, ret + strlen(str)); + return ret; +} + + gint search_find_next(ScintillaObject *sci, const gchar *str, gint flags, GeanyMatchInfo **match_) { GeanyMatchInfo *match; diff --git a/src/symbols.c b/src/symbols.c index 6d9933ec..c0a1cf67 100644 --- a/src/symbols.c +++ b/src/symbols.c @@ -2332,7 +2332,7 @@ static void on_find_usage(GtkWidget *widget, G_GNUC_UNUSED gpointer unused) if (widget == symbol_menu.find_in_files) search_show_find_in_files_dialog_full(tag->name, NULL); else - search_find_usage(tag->name, tag->name, SCFIND_WHOLEWORD | SCFIND_MATCHCASE, + search_find_usage(tag->name, tag->name, GEANY_FIND_WHOLEWORD | GEANY_FIND_MATCHCASE, widget == symbol_menu.find_usage); tm_tag_unref(tag);