[geany/geany] c65374: Fix member scope completion with nested members
Jiří Techet
git-noreply at xxxxx
Thu Feb 11 14:36:03 UTC 2016
Branch: refs/heads/master
Author: Jiří Techet <techet at gmail.com>
Committer: Jiří Techet <techet at gmail.com>
Date: Mon, 18 Jan 2016 23:40:06 UTC
Commit: c653741a3ce7ce1daf7da6cb44f3885e9ff151b5
https://github.com/geany/geany/commit/c653741a3ce7ce1daf7da6cb44f3885e9ff151b5
Log Message:
-----------
Fix member scope completion with nested members
First, the search for existing type with the given scope should be done
also for namespaces.
Second, with the string operations we get no scope as empty string ""
but the rest of TM functions expect scope to be set to NULL in such
case. Fix that.
Modified Paths:
--------------
tagmanager/src/tm_workspace.c
Modified: tagmanager/src/tm_workspace.c
3 lines changed, 2 insertions(+), 1 deletions(-)
===================================================================
@@ -941,6 +941,7 @@ static gboolean member_at_method_scope(const GPtrArray *tags, const gchar *metho
comps[len - 2] = NULL;
cls_scope = g_strjoinv(sep, comps);
comps[len - 2] = cls;
+ cls_scope = strlen(cls_scope) > 0 ? cls_scope : NULL;
/* check whether member inside the class */
if (g_strcmp0(member_tag->scope, member_scope) == 0)
@@ -949,7 +950,7 @@ static gboolean member_at_method_scope(const GPtrArray *tags, const gchar *metho
GPtrArray *cls_tags = g_ptr_array_new();
/* check whether the class exists */
- fill_find_tags_array(cls_tags, src, cls, cls_scope, TM_TYPE_WITH_MEMBERS, lang);
+ fill_find_tags_array(cls_tags, src, cls, cls_scope, TM_TYPE_WITH_MEMBERS | tm_tag_namespace_t, lang);
ret = cls_tags->len > 0;
g_ptr_array_free(cls_tags, TRUE);
}
--------------
This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).
More information about the Commits
mailing list