[Github-comments] [geany/geany] Add keywords to the autocompletion list (#1146)

Jiří Techet notifications at xxxxx
Fri Jul 22 19:23:19 UTC 2016


>  
>  	g_return_val_if_fail(editor, FALSE);
>  
> -	tags = tm_workspace_find_prefix(root, ft->lang, editor_prefs.autocompletion_max_entries);
> +	/* Get keywords and create a dummy TMTag array from them. These tags are
> +	 * then also searched when searching workspace */
> +	keywords = highlighting_get_keywords(ft->id);
> +	keyword_array = g_ptr_array_new_full(100, (GDestroyNotify)tm_tag_unref);
> +	foreach_strv(keyword, keywords)
> +	{
> +		if (**keyword != '\0')
> +		{
> +			TMTag *tag = tm_tag_new();
> +
> +			tag->name = g_strdup(*keyword);
> +			tag->lang = ft->lang;

This is a non-scope search (scope search doesn't make much sense for keywords, they in general don't appear after "." at least for the languages I know) and type isn't used anywhere in tm_workspace_find_prefix().

---
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/1146/files/1e74c11aca41274d690d8da0b6e59b1247fbb222#r71932027
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.geany.org/pipermail/github-comments/attachments/20160722/53980bc2/attachment.html>


More information about the Github-comments mailing list