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

Jiří Techet notifications at github.com
Sun May 8 13:30:55 UTC 2022


@techee commented on this pull request.



>  {
-	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 &&

Because I think that even though it's syntactically valid, such cases are rare enough to justify seeing many more (invalid) local variables defined after the current line. But this is something that will have to be tested once Python local variables are enabled.

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

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


More information about the Github-comments mailing list