Remove duplicate names from scope search popup

There may be duplicate tag names in the list e.g. when performing namespace
search and overloaded methods are found.
This commit is contained in:
Jiří Techet 2016-01-18 23:00:19 +01:00
parent cd1a58f0a5
commit f10747ae5a

View File

@ -1030,6 +1030,7 @@ tm_workspace_find_scope_members (TMSourceFile *source_file, const char *name,
tm_tag_macro_with_arg_t | tm_tag_prototype_t;
TMTagType tag_type = tm_tag_max_t &
~(function_types | tm_tag_enumerator_t | tm_tag_namespace_t | tm_tag_package_t);
TMTagAttrType sort_attr[] = {tm_tag_attr_name_t, 0};
if (function)
tag_type = function_types;
@ -1052,6 +1053,8 @@ tm_workspace_find_scope_members (TMSourceFile *source_file, const char *name,
g_ptr_array_free(tags, TRUE);
tm_tags_dedup(member_tags, sort_attr, FALSE);
return member_tags;
}