@techee commented on this pull request.
Looks good to me apart from the minor comments above.
In src/editor.c:
> @@ -1843,28 +1843,9 @@ static gint find_start_bracket(ScintillaObject *sci, gint pos) } -static gchar *find_calltip(const gchar *word, GeanyFiletype *ft) +static GPtrArray *update_tags_for_constructor_calltip(GPtrArray *tags, GeanyFiletype *ft, + TMTag *tag, const gchar *constructor_method)
I think it's a bit confusing for the reader of the code to see what this function does - it does a bit too many things. I think it would be better to call it something like get_constructor_tags()
without passing the tags
argument to it so this function would return GPtrArray *
when constructors are found or NULL otherwise. Then, later, when this function is called, the code would look like
GPtrArray *constructor_tags = get_constructor_tags(ft, tag, constructor_method);
if (constructor_tags)
{
g_ptr_array_free(tags, TRUE);
tags = constructor_tags;
}
In src/editor.c:
> @@ -1886,6 +1867,53 @@ static gchar *find_calltip(const gchar *word, GeanyFiletype *ft) g_ptr_array_free(constructor_tags, TRUE); } } + return tags; +} + + +static void update_tag_for_construtor_calltip(const gchar *word, TMTag *tag, const gchar **tag_name,
I would call this update_tag_name_and_scope_for_calltip()
or something similar because update_tag
feels like it changes the TMTag
.
In src/editor.c:
> @@ -1886,6 +1867,53 @@ static gchar *find_calltip(const gchar *word, GeanyFiletype *ft) g_ptr_array_free(constructor_tags, TRUE); } } + return tags; +} + + +static void update_tag_for_construtor_calltip(const gchar *word, TMTag *tag, const gchar **tag_name, + const gchar **scope, const gchar *constructor_method)
I'd suggest moving constructor_method
in front of tag_name
and scope
so the input arguments are in front of the output arguments.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.