[Github-comments] [geany/geany] WIP: Scoped calltips (#1188)

Thomas Martitz notifications at xxxxx
Wed Aug 24 22:03:55 UTC 2016


> @@ -1906,9 +2002,27 @@ static gchar *find_calltip(const gchar *word, GeanyFiletype *ft)
>  
>  	g_return_val_if_fail(ft && word && *word, NULL);
>  
> -	/* use all types in case language uses wrong tag type e.g. python "members" instead of "methods" */
> -	tags = tm_workspace_find(word, NULL, tm_tag_max_t, NULL, ft->lang);
> -	if (tags->len == 0)
> +	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);

What does this filter do? get_scoped_tags() already limits the found tags to the word at pos, doesn't it?

-- 
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/342e636b9d46e30b05bdfe68ec4c3b5ce9695db9#r76147984
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.geany.org/pipermail/github-comments/attachments/20160824/303ed135/attachment.html>


More information about the Github-comments mailing list