> -     tags = tm_workspace_find(word, NULL, tm_tag_max_t, NULL, ft->lang);
> +     tags = get_scoped_tags(editor, pos - strlen(word));
> +     if (tags)
> +     {
> +             GPtrArray *filtered = g_ptr_array_new();
> +
> +             foreach_ptr_array(tag, i, tags)
> +             {
> +                     if (strcmp(tag->name, word) == 0)
> +                             g_ptr_array_add(filtered, tag);
> +             }
> +
> +             g_ptr_array_free(tags, TRUE);
> +             tags = filtered;
> +     }
> +     else

To be sure the number of filtered tags from above could be checked here and if 
there are 0, fall back to searching all tags.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/pull/1188/files/91ccf4842a1f86559d419db5582683be2e1f1938#r76226271

Reply via email to