[Github-comments] [geany/geany] Enable local variables for C/C++ and improve autocompletion (PR #3185)

Thomas Martitz notifications at github.com
Sat May 7 22:10:24 UTC 2022


@kugel- requested changes on this pull request.

Minor stuff.

The "walk class hierarchy up for scope completion" makes a tiny bit nervous but it's your call. It would have been better to also separate this out but I don't want you to kill me now so keep it :-) 

>  	foreach_ptr_array(tmtag, i, tags)
 	{
+		if (!tm_workspace_is_autocomplete_tag(tmtag, doc->tm_file, current_line, current_scope))

Can you add a comment why this condition is needed now?  It's not entirely clear to me in the context of "goto tag"

>  {
-	TMTag **tag, *last = NULL;
-	guint i, count, num;
+	TMParserType lang = current_file ? current_file->lang : TM_PARSER_NONE;
+
+	/* ignore local variables from other files/functions or after current line */
+	gboolean valid = !(tag->type & tm_tag_local_var_t) ||
+		(current_file == tag->file &&
+		 current_line >= tag->line &&

Out of curiosity, why did you drop the idea of making this language specific? I think @elextr had a good example why this might not work so well for python.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/pull/3185#pullrequestreview-965365260
You are receiving this because you are subscribed to this thread.

Message ID: <geany/geany/pull/3185/review/965365260 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.geany.org/pipermail/github-comments/attachments/20220507/37efc507/attachment.htm>


More information about the Github-comments mailing list